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

Map http status codes #103

Merged
merged 9 commits into from
Aug 23, 2024
Merged

Map http status codes #103

merged 9 commits into from
Aug 23, 2024

Conversation

leeturner
Copy link
Collaborator

@leeturner leeturner commented Aug 23, 2024

This PR maps the http error codes detailed in the official docs to their corresponding grpc status codes.

References

Submitter checklist

  • Recommended: Join WireMock Slack to get any help in #help-contributing or a project-specific channel like #wiremock-java
  • The PR request is well described and justified, including the body and the references
  • The PR title represents the desired changelog entry
  • The repository's code style is followed (see the contributing guide)
  • Test coverage that demonstrates that the change works as expected
  • For new features, there's necessary documentation in this pull request or in a subsequent PR to wiremock.org

If a response comes back with a http status code we are specifically
mapping, make sure we return a grpc error response with the correct
status and message
If a response comes back with a http status code we are specifically
mapping, make sure we set the status and message so this can be
returned in the onComplete method of the streaming client
We are now returning the recommended grpc status for 404 responses and
parameterised tests have been added to validate the mappings from http
error codes to grpc statuses
We are now returning the recommended grpc status for 404 responses and
parameterised tests have been added to validate the mappings from http
error codes to grpc statuses
@leeturner leeturner merged commit 924363a into main Aug 23, 2024
8 checks passed
@leeturner leeturner deleted the map-http-status-codes branch August 23, 2024 16:06
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.

1 participant