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

api: errors are not thrown/catched correctly - this leads to difficult to read error messages #131

Closed
phpai opened this issue Mar 22, 2019 · 2 comments
Assignees
Labels
bug Something isn't working wontfix This will not be worked on

Comments

@phpai
Copy link
Contributor

phpai commented Mar 22, 2019

In GitLab by @Stezido on Mar 14, 2019, 14:39

@Stezido
Copy link
Contributor

Stezido commented Apr 3, 2019

The error status codes in a response body have to be more specific I suggest we use own status codes.
For example the endpoint user.authenticate can fail due to:

  • user does not exist (Not Found)
  • wrong password (Not Authenticated)
  • user is not from the node's organization (Decryption Failed)

So in the User Not Found case the response is a 400 Bad Request with following response body:

{
code: 1234,
message: "authentication failed: user does not exist"
}

@gonzochic gonzochic removed this from the TruBudget 1.0.0-beta.8 milestone Apr 4, 2019
@gonzochic gonzochic added this to the TruBudget 1.1.0 milestone Apr 25, 2019
@stale
Copy link

stale bot commented Jul 2, 2021

This issue has been automatically marked as stale because it has not had activity for 30 days. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the wontfix This will not be worked on label Jul 2, 2021
@Stezido Stezido removed this from the TruBudget 1.x.x milestone Jul 13, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working wontfix This will not be worked on
Projects
None yet
Development

No branches or pull requests

5 participants