Skip to content
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

Manage REST status codes #305

Open
lampajr opened this issue Feb 13, 2024 · 0 comments · Fixed by kubeflow/model-registry#74
Open

Manage REST status codes #305

lampajr opened this issue Feb 13, 2024 · 0 comments · Fixed by kubeflow/model-registry#74
Labels

Comments

@lampajr
Copy link
Contributor

lampajr commented Feb 13, 2024

Is your feature request related to a problem? Please describe.
Right now the REST proxy is returning 200 or 201 if everything went fine and it is returning 500 in case of any error.
Example:
https://github.com/opendatahub-io/model-registry/blob/44d87e40327f8b4ac9ceac2a9013fe39807d051c/internal/server/openapi/api_model_registry_service_service.go#L168-L177

Describe the solution you'd like
Properly manage the returned errors, including 404 and so on.

I see this implementation a 2-step impl:

  1. Adapt the core layer to return custom errors that already include the motivation (e..g, using some helpful enumeration)
  2. Make REST checking the error returned by the core layer and return the proper code

Describe alternatives you've considered
n/a

Additional context

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant