<@ULVA73B9P> I get an error when deploying one of ...
# ask-marvin
v
@Marvin I get an error when deploying one of my flows :
Copy code
Error while applying deployment: Client error '422 Unprocessable Entity' for  │
│ url '<https://server.url/api/deployments/>' - Response:  │
│ {'exception_message': 'Invalid request received.', 'exception_detail':        │
│ [{'type': 'extra_forbidden', 'loc': ['body', 'schedules', 0, 'replaces'],     │
│ 'msg': 'Extra inputs are not permitted', 'input': None}], 'request_body':
[...]
m
thought for 128.5 seconds
Thanks for the error detail — that 422 “extra_forbidden” on
schedules[0].replaces
means the API model that validates deployments does not allow a
replaces
field under
schedules
for the version you’re running. What’s happening - In Prefect 3.4.7, the deployment schema forbids unknown fields (Pydantic extra="forbid"). A
replaces
key in a schedule object is not recognized there, so the request is rejected. - Your payload appears to include
replaces: null
(the error shows
input: None
). Even if you don’t intend to use it, sending that key at all will trigger the “extra inputs are not permitted” error on that version. How to fix - Remove the
replaces
key from each schedule you send when creating/applying the deployment. Also ensure your config generator doesn’t emit
replaces: null
. - If you were trying to rename/replace an existing schedule slug: - On Prefect 3.4.7, you’ll need to handle it by removing the old schedule and adding a new one (i.e., update the deployment so the old schedule is omitted and a new schedule with the desired slug is included), rather than using a
replaces
field. - Alternatively, upgrade Prefect on both client and server to a version that supports schedule replacement semantics and keep them in sync. A client/server version mismatch can also surface as schema validation errors. If you can share how you’re applying the deployment (code snippet or the relevant part of your `prefect.yaml`/JSON body), I can point to the exact field to remove and suggest the safest way to update/rename your schedules without leaving stale ones behind.