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 error handling for issuance service #391

Closed
2 tasks done
sanjay-k1910 opened this issue Dec 29, 2023 · 1 comment · Fixed by #380, #427 or #430
Closed
2 tasks done

Improve error handling for issuance service #391

sanjay-k1910 opened this issue Dec 29, 2023 · 1 comment · Fixed by #380, #427 or #430
Assignees

Comments

@sanjay-k1910
Copy link
Contributor

sanjay-k1910 commented Dec 29, 2023

  • API routes should be self-explanatory & aligned with functionality.
  • Change Promise<object> to an interface.
  • Refactor responses (Only necessary fields should populate in response).
  • Check status codes
  • Check role-wise authentication to APIs with RoleGuards
  • Check API status and statusCode should be checked properly.
  • Error logs should be there wherever necessary.
  • End-to-end testing.
  • ESLint rules should not be disabled unless necessary
  • Validation on Payload.
  1. Apply trim() on payload.
  2. Apply toString(), toNumber() datatypes properly to payloads.
  3. Apply toOptional() if parameters are optionals.
  4. Apply notNull for parameters of payloads if not optional.
  • Error Response.

ex:

{
  "message": "User-friendly message",
  "error": "Some error description/error stack",
  "statusCode": 400,
}

APIs:

  • Create offer
  • Create an offer Out-of-band
@sanjay-k1910 sanjay-k1910 self-assigned this Dec 29, 2023
@sanjay-k1910 sanjay-k1910 added enhancement New feature or request and removed enhancement New feature or request labels Dec 29, 2023
@sanjay-k1910 sanjay-k1910 linked a pull request Dec 29, 2023 that will close this issue
@sanjay-k1910
Copy link
Contributor Author

Completed.

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