-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
An unknown operation doesn't give a helpful error message #36
Comments
I think that this is supposed to raise a 422 (at least that's what aragorn does) |
Just to clarify, is this for an unknown operation, or an operation without any operation providers? An invalid or unknown operation already raises a 422. The error is caused when we have no operation providers for a given operation, but the operation itself is valid. |
Does the workflow runner have an operations element in its openapi saying which operations it implements? Assuming it does, then any incoming operation that's not in the list (valid or not) should return something in the 400 range b/c the user should know better than to send invalid or unimplemented ops. |
The workflow runner maintains a list of valid operations (as dictated by the operations schema from the operations and workflow repo and exposed at standards.ncats.io), but it doesn't report any operations in its openapi spec, at least not that I can see. Even if it did, I don't think it would make sense to to even report something like "operations which have at least one valid service provider" reported in openapi since the /refresh endpoint can be used to reload all operations and operation providers, which would then necessitate a refresh of the openapi spec. We do throw a 422 for an invalid operation, but since the workflow runner doesn't actually implement any operations and only acts a messenger to contact services that do provide services, I think it's reasonable that it isn't exposed at all. |
Attempting to use a valid operation that has no valid operation provider currently results in a 500. We should check that all operations are valid and that we have operation providers for that operation.
The text was updated successfully, but these errors were encountered: