You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In #281, creating a work pool would cause a fairly unhelpful 404 error. After some digging, turns out that API requires the workspace ID to be configured. It's marked as optional for compatibility with OSS, but is actually required for Prefect Cloud.
There are already some accomodations for this in clients like the one for blocks, that checks if the workspace ID is null and returns an error if so.
We can do a couple things to make this a better experience:
Comb through and make sure all resources that require workspace ID settings include a check for the workspace_id to be configured. You can check by looking at Path parameters in the API docs for each resource.
Put that calculation and error message linked above into a helper and use that helper consistently.
Make a note somewhere, maybe in CONTRIBUTING.md, to keep this in mind when adding support for new resources.
The text was updated successfully, but these errors were encountered:
Summary
In #281, creating a work pool would cause a fairly unhelpful 404 error. After some digging, turns out that API requires the workspace ID to be configured. It's marked as optional for compatibility with OSS, but is actually required for Prefect Cloud.
There are already some accomodations for this in clients like the one for blocks, that checks if the workspace ID is null and returns an error if so.
We can do a couple things to make this a better experience:
workspace_id
to be configured. You can check by looking atPath parameters
in the API docs for each resource.The text was updated successfully, but these errors were encountered: