Skip to content

Commit 1d3df73

Browse files
authored
Merge pull request #2441 from AzureAD/veena/fixHttpErrorMapping
Add new error mapping for http error code 403 and 404
2 parents fd46b2e + fb7a0c4 commit 1d3df73

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

MSAL/src/MSALErrorConverter.m

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,8 @@ + (void)initialize
130130
@(MSIDErrorServerError) : @(MSALErrorServerError),
131131
@(MSIDErrorServerInvalidState) : @(MSALInternalErrorInvalidState),
132132
@(MSIDErrorServerProtectionPoliciesRequired) : @(MSALErrorServerProtectionPoliciesRequired),
133-
@(MSIDErrorServerUnhandledResponse) : @(MSALInternalErrorUnhandledResponse)
133+
@(MSIDErrorServerUnhandledResponse) : @(MSALInternalErrorUnhandledResponse),
134+
@(MSIDErrorUnexpectedHttpResponse) : @(MSALInternalErrorUnexpectedHttpResponse)
134135
}
135136
};
136137

MSAL/src/public/MSALError.h

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -262,6 +262,11 @@ typedef NS_ENUM(NSInteger, MSALInternalError)
262262
*/
263263
MSALInternalErrorUnexpected = -42008,
264264

265+
/**
266+
Un expected http response with status code 403 or 404
267+
*/
268+
MSALInternalErrorUnexpectedHttpResponse = -42009,
269+
265270
/**
266271
The passed in authority URL does not pass validation.
267272
If you're trying to use B2C, you must disable authority validation by
@@ -525,4 +530,5 @@ typedef NS_ENUM(NSInteger, MSALInternalError)
525530
JIT - Error Handling config invalid or not found
526531
*/
527532
MSALErrorJITErrorHandlingConfigNotFound = -42738,
533+
528534
};

0 commit comments

Comments
 (0)