Open Rakee08 opened 2 years ago
When
authClient .signIn({ username, password }) .then((success) => { return success }) .catch((error) => { console.log(error) });
Should return http status on the error object
Actual behavior - Receiving status on error.xhr.status
{ "name": "AuthApiError", "errorSummary": "Authentication failed", "errorCode": "E0000004", "errorLink": "E0000004", "errorId": "", "errorCauses": [], "xhr": { "responseText": "{\"errorCode\":\"E0000004\",\"errorSummary\":\"Authentication failed\",\"errorLink\":\"E0000004\",\"errorId\":\"\",\"errorCauses\":[]}", "status": 401, "responseType": "json", "responseJSON": { "errorCode": "E0000004", "errorSummary": "Authentication failed", "errorLink": "E0000004", "errorId": "", "errorCauses": [] } } }
Provide wrong username or password
No response
"@okta/okta-react-native": "1.12.1"
@Rakee08 did you ever solve this?
@evenSosaAkido No. I have handled by showing more generalised error message.
Describe the bug?
When
authClient .signIn({ username, password }) .then((success) => { return success }) .catch((error) => { console.log(error) });
What is expected to happen?
Should return http status on the error object
What is the actual behavior?
Actual behavior - Receiving status on error.xhr.status
{ "name": "AuthApiError", "errorSummary": "Authentication failed", "errorCode": "E0000004", "errorLink": "E0000004", "errorId": "", "errorCauses": [], "xhr": { "responseText": "{\"errorCode\":\"E0000004\",\"errorSummary\":\"Authentication failed\",\"errorLink\":\"E0000004\",\"errorId\":\"\",\"errorCauses\":[]}", "status": 401, "responseType": "json", "responseJSON": { "errorCode": "E0000004", "errorSummary": "Authentication failed", "errorLink": "E0000004", "errorId": "", "errorCauses": [] } } }
Reproduction Steps?
Provide wrong username or password
Additional Information?
No response
SDK Version
"@okta/okta-react-native": "1.12.1"
Build Information
No response