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
Describe the bug
Trying to obtain a schema or document record or downloading their contents for a version which does not exist results in HTTP 400 and a message like ID '27c4bd97-1b5e-46de-a548-6ec44a6edc22' or version '3' doesn't exist!
There are several issues with this behavior:
If something is not found, HTTP 404 should be returned. HTTP 400 is typically used if there are syntactic issues with the request, e.g., an invalid body, but in that case, the request itself is totally fine.
The message is not clear enough about the reason (for no reason ;-)). If the user provides an invalid ID, MetaStore responds with HTTP 404 and a message like Data resource with identifier 27c4bd97-1b5e-46de-a548-6ec44a6edc2 was not found. Therefore, the message in our case could be much more specific, e.g., Version 3 of resource XYZ does not exist.
While testing out the response for case 2 I saw the mentioning of "Data resource", which is probably due to the fact, that this error is thrown by the repo-core part, whereas the other scenario is handled by MetaStore itself. It could be misleading for the user to mix terminologies (metadata record, schema record vs. data resource), but I'm not sure how to cope with this with the current architecture.
Expected behavior
Regarding the main issue I would suggest to change the response to HTTP 404 with a message like Version 3 of resource XYZ does not exist.
The text was updated successfully, but these errors were encountered:
Describe the bug
Trying to obtain a schema or document record or downloading their contents for a version which does not exist results in HTTP 400 and a message like ID '27c4bd97-1b5e-46de-a548-6ec44a6edc22' or version '3' doesn't exist!
There are several issues with this behavior:
Expected behavior
Regarding the main issue I would suggest to change the response to HTTP 404 with a message like Version 3 of resource XYZ does not exist.
The text was updated successfully, but these errors were encountered: