Overview
This document provides comprehensive error handling guidance for external developers integrating with the Customer Sign-In API endpoint. Each error scenario includes classification, sample responses, and actionable recommendations for handling the error in your application.Error Types
The endpoint can return errors classified into four main categories:- Validation Error: Request format or schema issues
- Network Error: HTTP method or connectivity issues
- Authentication Error: User account or credential issues
- Internal Server Error: Server-side failures requiring retry logic
Error Index
Quick navigation to specific error scenarios:- Validation Error (Request Body Schema)
- Method Not Allowed Error
- User not found / Incorrect credentials
- Account Disabled / Inactive
- Invalid User Status (Not Active/Inactive)
- Incomplete Account Setup
1. Validation Error (Request Body Schema)
Scenario
Request body does not match the required schema (Auth.SignIn.SignInWithPasswordRequestSchema).
When It Happens
- Missing required fields (e.g.,
emailorpassword) - Invalid field types (e.g.,
emailis not a string,passwordis not a string) - Invalid field formats (e.g.,
emailis not a valid email format) - Extra fields that are not allowed
Classification
Validation ErrorError Details
- Error Class:
ValidationMiddlewareError - HTTP Status:
400 Bad Request - Error Code:
INVALID
Sample API Response
Example Scenarios
- Missing email:
{ "password": "password123" } - Missing password:
{ "email": "[email protected]" } - Invalid email format:
{ "email": "not-an-email", "password": "password123" } - Empty body:
{}
How to Handle
-
Validate input before sending the request: Implement client-side validation to ensure all required fields (
emailandpassword) are present and properly formatted before making the API call. -
Ensure proper request format: Verify that your request body matches the expected schema:
email: Must be a valid email address stringpassword: Must be a non-empty string- Remove any extra fields that are not part of the schema
2. Method Not Allowed Error
Scenario
Request uses an HTTP method other than POST (e.g., GET, PUT, DELETE, PATCH).When It Happens
- Client sends GET request to
/customer/sign-in - Client sends PUT/DELETE/PATCH request to
/customer/sign-in - Any non-POST request to this endpoint
Classification
Network Error (HTTP method mismatch)Error Details
- Error Class:
MethodNotAllowedError - HTTP Status:
405 Method Not Allowed - Error Code:
NOT_ALLOWED
Sample API Response
How to Handle
-
Verify HTTP method: Ensure you are using the
POSTmethod for this endpoint. This is a configuration issue in your HTTP client code. - Check your API client setup: Review your HTTP client configuration (fetch, axios, etc.) to ensure the correct method is being used.
- No retry needed: This is a permanent error that indicates incorrect API usage. Fix the HTTP method in your code and the request will succeed.
- Update your integration: If you’re using a generated API client or SDK, ensure it’s up to date with the latest API specification.
3. User Not Found / Incorrect Credentials
Scenario
User with the provided email does not exist in the database, OR email exists but password is incorrect.When It Happens
- Email does not exist for CUSTOMER role
- Email exists but password is incorrect
- User exists but does not have CUSTOMER role assigned
Classification
Authentication ErrorError Details
- Error Class:
SignInApiError - HTTP Status:
400 Bad Request - Error Code:
INVALID - Message:
"Incorrect username or password."
Sample API Response
How to Handle
- Do not auto-retry: This error requires user action (correcting credentials), so do not automatically retry the request.
- Implement rate limiting on your side: To prevent brute force attacks, consider limiting the number of failed sign-in attempts from your application before requiring additional verification.
- Handle gracefully: Since this is a common user error, ensure your UI handles it gracefully without causing frustration. Consider showing helpful hints like “Check your email and password” or “Make sure Caps Lock is off”.
- Do not store credentials: Never log or store the user’s password in any form, even in error logs.
4. Account Disabled / Inactive
Scenario
User account exists but has been disabled (status is INACTIVE).When It Happens
- User’s status is
INACTIVE - Account has been manually disabled by an administrator
Classification
Authentication ErrorError Details
- Error Class:
SignInApiError - HTTP Status:
400 Bad Request - Error Code:
INVALID - Message:
"Your account has been disabled, Contact Support."
Sample API Response
How to Handle
- Display the error message clearly: Fail gracefully, show the exact error message “Your account has been disabled, Contact Support.” to the user.
- Provide support contact information: Display contact information for support (email, phone, or support portal) so the user knows how to get help.
- Log for monitoring: Consider logging this error (without sensitive information) for your monitoring systems to track account issues.
- Do not auto-retry: This error will persist until the account is reactivated by an administrator, so automatic retries are not useful.
5. Invalid User Status (Not Active/Inactive)
Scenario
User exists but has a status that is not ACTIVE or INACTIVE (e.g., SIGNUP_PENDING, etc.).When It Happens
- User status is
SIGNUP_PENDINGor any other status not in[ACTIVE, INACTIVE] - User has not completed onboarding process
Classification
Authentication ErrorError Details
- Error Class:
SignInApiError - HTTP Status:
400 Bad Request - Error Code:
INVALID - Message:
"Onboard the platform via Invitation Link sent to your email or Contact Support."
Sample API Response
How to Handle
- Provide support contact: Include support contact information in case the user needs help accessing their invitation or has questions about the onboarding process.
- Do not allow immediate retry: This error indicates the user needs to take action outside of your application (checking email, completing onboarding). Do not allow immediate retry.
- Helpful messaging: Consider adding context like “This account is pending setup. Please check your email for the invitation link to complete your registration.”
6. Incomplete Account Setup
Scenario
User account exists but setup is incomplete (first login or email not verified).When It Happens
- First login has not been completed
- Email has not been verified
- User has not completed initial account setup
Classification
Authentication ErrorError Details
- Error Class:
SignInApiError - HTTP Status:
400 Bad Request - Error Code:
INVALID - Message:
"Your account setup is incomplete. Please contact support for assistance."
Sample API Response
How to Handle
- Display the error message: Show the error message clearly to the user, as it explains that their account setup is incomplete.
- Provide support contact: Include support contact information prominently, as the user needs to contact support to resolve this issue.
- Do not allow retry: This error indicates the account requires administrative action or additional setup steps that cannot be completed through the sign-in process. Do not allow immediate retry.