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

Decouple exception class and error codes #1521

Open
murali-shris opened this issue Aug 22, 2023 · 0 comments
Open

Decouple exception class and error codes #1521

murali-shris opened this issue Aug 22, 2023 · 0 comments
Labels
enhancement New feature or request

Comments

@murali-shris
Copy link
Member

Is your feature request related to a problem? Please describe.

Currently error codes are tied to an Exception class. See https://github.com/atsign-foundation/at_libraries/blob/d4b89fb2e8d4e09b6c65a468f90c5d255d95a17c/packages/at_commons/lib/src/exception/error_message.dart
An exception class can have different error codes.
e.g
UnAuthenticatedException
AT0025 - APKAM enrollment pending
AT0026 - APKAM enrollment denied
AT0027 - APKAM enrollment revoked

Describe the solution you'd like

  • When an exception is thrown by server verb handler with different error codes, base response handler should return the error code in server socket response
  • BaseResponseHandler should honour Response object error code and error message
  • Analyse whether introducing error_code string in at_exceptions.dart is needed.

Describe alternatives you've considered

No response

Additional context

No response

@murali-shris murali-shris added the enhancement New feature or request label Aug 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant