platform icon indicating copy to clipboard operation
platform copied to clipboard

Improve error handling for APIs of Ecosystem Module

Open nishad-ayanworks opened this issue 1 year ago • 1 comments

  • API routes should be self-explanatory & aligned with functionality.
  • Change Promise 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,
}

APIs:

  • [ ] Get all endorsement transactions
  • [ ] Get all ecosystem schemas
  • [x] Get all organization ecosystems
  • [x] Create a new ecosystem
  • [x] Get ecosystem dashboard details
  • [x] Get received ecosystem invitations
  • [x] Get all sent invitations
  • [x] Send ecosystem invitation
  • [ ] Get ecosystem members list
  • [ ] Request new schema
  • [ ] Request new credential-definition
  • [ ] Sign transaction
  • [ ] Submit transaction
  • [ ] Auto sign and submit transactions
  • [ ] Accept or reject ecosystem invitation
  • [x] Edit ecosystem
  • [ ] Decline Endorsement Request By Lead
  • [ ] Delete ecosystem pending invitations

nishad-ayanworks avatar Dec 18 '23 12:12 nishad-ayanworks