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 APIs of User, Auth modules #353

Closed
14 tasks done
nishad-ayanworks opened this issue Dec 18, 2023 · 1 comment · Fixed by #368, #379, #377, #386 or #392
Closed
14 tasks done

Improve error handling for APIs of User, Auth modules #353

nishad-ayanworks opened this issue Dec 18, 2023 · 1 comment · Fixed by #368, #379, #377, #386 or #392
Assignees

Comments

@nishad-ayanworks
Copy link
Contributor

nishad-ayanworks commented Dec 18, 2023

  • Change the existing Promise<object> to a well-defined interface.
  • Ensure that API routes are both self-explanatory and aligned with their respective functionalities.
  • Refactor responses by populating only the necessary fields in the response.
  • Implement RoleGuards for role-specific authentication to APIs.
  • End-to-end testing.
  • Check API status and status codes for consistency.
  • Error logs should be there when necessary.
  • 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,
}

User:

  • Fetch login user details
  • Get all platform and ecosystem settings
  • Update platform and ecosystem settings
  • Users activity
  • Organization invitations
  • Check user exist
  • Get user credentials by Id
  • Share user certificate
  • Update user profile
  • Store user password details

Auth:

  • Verify user’s email
  • Send verification email
  • Register new user to platform
  • Authenticate the user for the access
@nishad-ayanworks nishad-ayanworks changed the title Improve error handling for APIs Improve error handling for APIs of User & Organization Dec 18, 2023
@pranalidhanavade pranalidhanavade changed the title Improve error handling for APIs of User & Organization Improve error handling for APIs of User Dec 20, 2023
@pranalidhanavade pranalidhanavade changed the title Improve error handling for APIs of User Improve error handling for APIs of User, Auth and Fido modules Dec 21, 2023
@vivekayanworks vivekayanworks changed the title Improve error handling for APIs of User, Auth and Fido modules Improve error handling for APIs of User, Auth and FIDO modules Dec 21, 2023
@pranalidhanavade pranalidhanavade linked a pull request Dec 23, 2023 that will close this issue
@pranalidhanavade pranalidhanavade changed the title Improve error handling for APIs of User, Auth and FIDO modules Improve error handling for APIs of User, Auth modules Dec 28, 2023
@pranalidhanavade
Copy link
Contributor

This is completed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment