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 agent & provisioning service #357

Closed
3 tasks done
nishad-ayanworks opened this issue Dec 18, 2023 · 0 comments · Fixed by #374 or #373
Closed
3 tasks done

Improve error handling for agent & provisioning service #357

nishad-ayanworks opened this issue Dec 18, 2023 · 0 comments · Fixed by #374 or #373
Assignees
Labels
enhancement New feature or request

Comments

@nishad-ayanworks
Copy link
Contributor

nishad-ayanworks commented Dec 18, 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 where ever necessary.
  • End-to-end testing.
  • 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,
}
  • /orgs/:orgId/agents/health
  • /orgs/:orgId/agents/spinup
  • /orgs/:orgId/agents/wallet
@nishad-ayanworks nishad-ayanworks changed the title Improve error handling for agent service & provisioning Improve error handling for agent & provisioning service Dec 18, 2023
@KulkarniShashank KulkarniShashank added the enhancement New feature or request label Dec 18, 2023
This was linked to pull requests Dec 26, 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

Successfully merging a pull request may close this issue.

3 participants