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

Improve response messages and implement meaningful error messages #519

Open
jannisjung opened this issue Nov 8, 2024 · 0 comments
Open

Comments

@jannisjung
Copy link
Contributor

jannisjung commented Nov 8, 2024

As a developer or API user, I want the API to provide clear and meaningful error responses so that I can understand whether a feature is not implemented or there is an issue with the backend, and take appropriate action.

Rules

  • When a feature is not implemented for an endpoint but the spec/interface includes it, the response when using it should reflect this
  • When there is a problem in the backend, the response should include a meaningful response (not just internal server error 500 response)
  • analyze, where exceptions are "just" passing the the stack trace, try throwing a more specific exception or if it is a runtime exception, add a more specific Error description

Entry Points

Acceptance Criteria

For each endpoint all known errors are handled with meaningful error messages and http status

Risks and Assumptions

  • Message handling for error responses should be part of common
  • Error messages should be meaningful, but should not provide insight into the codebase
  • how would just an exception be decoded to a useful message -> providing the message is more problematic -> mapping between exception and Message needed
    • Http status is translated to its actual meaning
    • Error Message that is provided by java is enough in the first place
    • (Translation from Java error message to meaningful error message is out of scope)

References & Notes

This is the package for messages: org.eclipse.digitaltwin.basyx.aasregistry.model.Message

Dependencies and Blockers

@jannisjung jannisjung converted this from a draft issue Nov 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: BaSyx Java V2
Development

No branches or pull requests

1 participant