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

Resolver: Sane responses in the case of errors #286

Closed
martastain opened this issue Jul 19, 2024 · 2 comments · Fixed by #307
Closed

Resolver: Sane responses in the case of errors #286

martastain opened this issue Jul 19, 2024 · 2 comments · Fixed by #307
Assignees

Comments

@martastain
Copy link
Member

martastain commented Jul 19, 2024

Story

Currently /api/resolve does not correctly handle malformed URIs as mentioned here #283

Problems

When a malformed URI is present in the request, the entire request fails with error 500 (which implies a server problem rather than client).

Proposal

  • When a request contains a malformed uri, 400 response should be returned instead, keeping 500 for real errors
  • Add canFail option to the request model, that would allow skipping erroring URIs instead of failing the entire query similarly to /api/projects/{projectName}/operations - in that case, skipped entities could be either simply excluded (similarly as they were missing) or included with a status code per record

Tagging @dee-ynput @Lypsolon and @BigRoy for visibility

@martastain martastain added type: feature Adding something new and exciting to the product type: enhancement Improvement of existing functionality or minor addition and removed type: feature Adding something new and exciting to the product labels Jul 19, 2024
@BigRoy
Copy link
Contributor

BigRoy commented Jul 19, 2024

Currently /api/response does not correctly handle malformed URI

I'm sure you meant /api/resolve?

What the best return code or behavior is I'm not sure, I'm not expert in web requests and responses so I'll leave this to others. Just wanted to remark that at least being able to identify which of the responses was invalid would be very nice if possible.

@martastain
Copy link
Member Author

I'm sure you meant /api/resolve?

sorry. fixed :)

@martastain martastain self-assigned this Jul 24, 2024
@martastain martastain linked a pull request Aug 2, 2024 that will close this issue
@dee-ynput dee-ynput removed the type: enhancement Improvement of existing functionality or minor addition label Nov 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants