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

HTTP method validation for the transaction bundle request. #4714

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

Conversation

v-aljagtap
Copy link
Contributor

Description

  • Added validation to ensure the HTTP method in the Request component of the transaction bundle is a valid HTTPVerb enum value.

  • If the HTTP method is invalid or null, a RequestNotValidException is thrown with a 400 Bad Request status and an error message.

Related issues

Addresses issue #AB 130262.

Testing

We checked the upload of the transaction bundle to the FHIR server, using the invalid request method type 'PUT''.
Result - Operation failed, and status code of 400 Bad Request is returned with error message.

We tested other HTTP operations, including the bundle containing the 'PUT'', 'GET'', 'POST'', and 'DELETE'' request methods. In all scenarios, it returned a 400 Bad Request with error message.

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.
  • CI is green before merge Build Status
  • Review squash-merge requirements

Semver Change (docs)

Patch|Skip|Feature|Breaking (reason)

@v-aljagtap v-aljagtap added Bug Bug bug bug. Azure Healthcare APIs Label denotes that the issue or PR is relevant to the FHIR service in the Azure Healthcare APIs labels Nov 5, 2024
@v-aljagtap v-aljagtap added this to the S153 milestone Nov 5, 2024
@v-aljagtap v-aljagtap requested a review from a team as a code owner November 5, 2024 11:03
@v-aljagtap v-aljagtap changed the title Error "Value 'PUT'' cannot be cast to a member of enumeration HTTPVerb." is not handle correctly. HTTP method validation for the transaction bundle request. Nov 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Azure Healthcare APIs Label denotes that the issue or PR is relevant to the FHIR service in the Azure Healthcare APIs Bug Bug bug bug.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant