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

Change return code on fail to encode batch secrets #2124

Merged
merged 1 commit into from
Apr 28, 2021
Merged

Conversation

telday
Copy link
Contributor

@telday telday commented Apr 23, 2021

What does this PR do?

Now when Conjur attempts to encode a batch secrets
response into JSON format and encounters an encoding
error it will return a 406 status code to the user.
This indicates that The given Accept-Encoding header
is not valid for the retrieved values.

Checklists

Change log

  • The CHANGELOG has been updated, or
  • This PR does not include user-facing changes and doesn't require a CHANGELOG update

Test coverage

  • This PR includes new unit and integration tests to go with the code changes, or
  • The changes in this PR do not require tests

Documentation

  • Docs (e.g. READMEs) were updated in this PR, and/or there is a follow-on issue to update docs, or
  • This PR does not require updating any documentation

API Changes

  • The OpenAPI spec has been updated to meet new API changes (or an issue has been opened), or
  • The changes in this PR do not affect the Conjur API

@telday telday force-pushed the change-return-code branch from 55fa376 to 9c182b2 Compare April 23, 2021 14:36
@telday telday marked this pull request as ready for review April 23, 2021 14:50
@telday telday requested a review from a team as a code owner April 23, 2021 14:50
@telday telday force-pushed the change-return-code branch from 9c182b2 to 57adba4 Compare April 23, 2021 14:52
@telday telday requested a review from izgeri April 23, 2021 14:54
@telday telday force-pushed the change-return-code branch from 57adba4 to 8e5d2ac Compare April 26, 2021 18:26
@telday telday requested a review from izgeri April 26, 2021 18:26
jonahx
jonahx previously approved these changes Apr 27, 2021
@telday telday force-pushed the change-return-code branch 2 times, most recently from c115f9b to 44680ba Compare April 27, 2021 14:59
Now when Conjur attempts to encode a batch secrets
response into JSON format and encounters an encoding
error it will return a 406 status code to the user.
This indicates that The given `Accept-Encoding` header
is not valid for the retrieved values.
@telday telday force-pushed the change-return-code branch from 44680ba to 05230f1 Compare April 27, 2021 15:38
@codeclimate
Copy link

codeclimate bot commented Apr 27, 2021

Code Climate has analyzed commit 05230f1 and detected 0 issues on this pull request.

The test coverage on the diff in this pull request is 100.0% (50% is the threshold).

This pull request will bring the total coverage in the repository to 89.1%.

View more on Code Climate.

@telday telday merged commit 95a29bd into master Apr 28, 2021
@telday telday deleted the change-return-code branch April 28, 2021 13:33
@alexkalish
Copy link
Contributor

Does this only apply to the changes made in #1962? Or does it apply else where? @izgeri, do you know?

@izgeri
Copy link
Contributor

izgeri commented May 19, 2021

@alexkalish it only applies to the custom error we added for the batch secrets request endpoint in #1989 (which resolved #1962)

we previously added the exception but we didn't rescue it here to return a non-500 error code; this PR fixes that.

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.

4 participants