platform
platform copied to clipboard
Improve error handling for APIs of Ecosystem Module
- API routes should be self-explanatory & aligned with functionality.
- Change Promise
- 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.
- Apply
trim()
on payload. - Apply
toString()
,toNumber()
datatypes properly to payloads. - Apply
toOptional()
if parameters are optionals. - 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