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

Add new error mapping for http error code 403 and 404 #2441

Open
wants to merge 2 commits into
base: dev
Choose a base branch
from

Conversation

Veena11
Copy link
Contributor

@Veena11 Veena11 commented Dec 18, 2024

Proposed changes

Describe what this PR is trying to do.

Type of change

  • [ x] Feature work
  • Bug fix
  • Documentation
  • Engineering change
  • Test
  • Logging/Telemetry

Risk

  • High – Errors could cause MAJOR regression of many scenarios. (Example: new large features or high level infrastructure changes)
  • [x ] Medium – Errors could cause regression of 1 or more scenarios. (Example: somewhat complex bug fixes, small new features)
  • Small – No issues are expected. (Example: Very small bug fixes, string changes, or configuration settings changes)

Additional information

@Veena11 Veena11 requested a review from a team as a code owner December 18, 2024 02:32
@@ -1 +1 @@
Subproject commit 056ed89ec7cfa1cf35f2781b3548315e4c403054

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This pull request does not update CHANGELOG.md.

Please consider if this change would be noticeable to a partner or user and either update CHANGELOG.md or resolve this conversation.

@ameyapat
Copy link
Contributor

Cloned PR for veena/fixHttpErrorMapping


AI description (iteration 1)

PR Classification

Bug fix

PR Summary

This pull request addresses the handling of HTTP 403 and 404 errors in the MSAL library.

  • MSIDDefaultSilentTokenRequestTests.m: Added a test to verify that a 403 HTTP response returns the correct error.
  • MSIDAADRequestErrorHandler.m: Updated error handling to create a specific underlying error for 403 and 404 HTTP status codes.
  • MSALError.h: Introduced a new error code MSALInternalErrorUnExpectedHttpResponse for unexpected HTTP responses.
  • MSIDError.m and MSIDError.h: Added the new error code MSIDErrorUnExpectedHttpResponse and updated error code mappings.
  • MSALErrorConverter.m: Mapped the new error code to the internal error code.

@ameyapat
Copy link
Contributor

Cloned PR for veena/fixHttpErrorMapping


AI description (iteration 1)

PR Classification

Bug fix for handling unexpected HTTP error responses.

PR Summary

This pull request addresses the handling of unexpected HTTP error responses, specifically for status codes 403 and 404.

  • MSIDDefaultSilentTokenRequestTests.m: Added a test to verify that a 403 HTTP response returns the correct underlying error.
  • MSIDAADRequestErrorHandler.m: Updated error handling to create an underlying error for 403 and 404 HTTP status codes.
  • MSALError.h, MSIDError.h, MSIDError.m, MSALErrorConverter.m: Added new error codes for unexpected HTTP responses and updated error conversion logic.
  • MSIDAADRequestErrorHandlerTests.m: Added tests to verify the correct handling of underlying errors for 403 and 404 HTTP responses.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants