API HTTP server errors with Azure AD B2C

Image: “HTTP error codes”

Have a read of this post first.

Notice how a managed HTTP 409 API error is displayed on the user’s screen.

But what happens if the API returns a HTTP server error?

You can configure HTTP errors in Beeceptor.

Image showing Beeceptor configured to retrun HTTP 403.

Returning an HTTP 403 error (Forbidden) displays:

Image showing error: Basic credentials specified for ‘REST-TestAPI’ are invalid. Check that the credentials are correct and that access has been granted by the resource.

Returning an HTTP 500 error (Internal Server Error) displays:

Image showing error: The claims exchange ‘REST-TestAPI’ specified in step ‘1’ returned HTTP error response with Code ‘InternalServerError’ and Reason ‘Internal Server Error’.

Returning an HTTP 501 error (Not implemented) displays:

Image showing error: The claims exchange ‘REST-TestAPI’ specified in step ‘1’ returned HTTP error response with Code ‘NotImplemented’ and Reason ‘Not Implemented’.

And so on.

You can customise these errors to some extent.

All good!

--

--

--

“Identity is the new control plane”. Articles around Microsoft Identity, Auth0 and identityserver. Click the “Archive” link at the bottom for more posts.

Recommended from Medium

Carbon v11 Release Candidate 1

SQL for Beginners and Analysts — Get Started with SQL using Python , PART-1.

Declutter your old Slack channel messages with Python

Optimize Costs for Google Kubernetes Engine: Challenge Lab

Precision T3600 Q4000 E5–1650 V1 3.2 Ghz 16Gb Ram 240Gb SSD

Build Your Own Web Analytics Platform in 25 Minutes

Spark Session and the singleton misconception!

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Rory Braybrook

Rory Braybrook

NZ Microsoft Identity dude and MVP. Azure AD/B2C/ADFS/Auth0/identityserver. StackOverflow: https://bit.ly/2XU4yvJ Presentations: http://bit.ly/334ZPt5

More from Medium

Using Azure Web Apps (for Free) with Oracle Autonomous Database (without Wallets)

Issues with an Azure AD B2C self-asserted page calling a ValidationTechnicalProfile

Puzzling image

Scan SonarQube branches and pull request branches without paid licenses

Application Insights & Azure Table Storage CreateIfNotExists Errors