Skip to content

Conversation

@mikaelweave
Copy link
Contributor

@mikaelweave mikaelweave commented Jan 23, 2026

Description

Adds proper error handling for HTTP 415 (Unsupported Media Type) responses in the FhirController's error handling fallback method.

Previously, when a request was made with an unsupported content type, the server would return a generic 500 Internal Server Error. This change ensures that 415 errors are properly handled and return:

  • HTTP status code: 415 (UnsupportedMediaType)
  • OperationOutcome issue type: NotSupported
  • Diagnostic message: "The content type is not supported."

Related issues

Fixes handling of unsupported media type errors in FHIR API responses.

Testing

  • Manual testing by sending requests with unsupported content types
  • Verified correct OperationOutcome structure is returned with 415 status

FHIR Team Checklist

  • Update the title of the PR to be succinct and less than 65 characters
  • Add a milestone to the PR for the sprint that it is merged (i.e. add S47)
  • Tag the PR with the type of update: Bug, Build, Dependencies, Enhancement, New-Feature or Documentation
  • Tag the PR with Open source, Azure API for FHIR (CosmosDB or common code) or Azure Healthcare APIs (SQL or common code) to specify where this change is intended to be released.
  • Tag the PR with Schema Version backward compatible or Schema Version backward incompatible or Schema Version unchanged if this adds or updates Sql script which is/is not backward compatible with the code.
  • When changing or adding behavior, if your code modifies the system design or changes design assumptions, please create and include an ADR.
  • CI is green before merge Build Status
  • Review squash-merge requirements

Semver Change (docs)

Patch

@mikaelweave mikaelweave requested a review from a team as a code owner January 23, 2026 21:18
@mikaelweave mikaelweave added this to the FY26\Q3\2Wk\2Wk15 milestone Jan 23, 2026
@mikaelweave mikaelweave added Azure Healthcare APIs Label denotes that the issue or PR is relevant to the FHIR service in the Azure Healthcare APIs No-ADR ADR not needed No-PaaS-breaking-change and removed Azure Healthcare APIs Label denotes that the issue or PR is relevant to the FHIR service in the Azure Healthcare APIs labels Jan 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants