aws-sdk-cpp
aws-sdk-cpp copied to clipboard
Set BAD_REQUEST error code for 400 error instead of UNKNOWN
Issue #, if available:
This fixes https://github.com/aws/aws-sdk-cpp/issues/1843
More crucially, it removes the current inconsistency between boto3 and the AWS CLI on the one hand and the C++ SDK on the other hand when it comes to 400 return codes.
Description of changes:
Convert a 400 http status code into a BAD_REQUEST error instead of UNKNOWN.
This PR might need to be re-done from the Amazon side since I'm not familiar with the code generation tools used. I just fixed the occurrences manually.
Check all that applies:
- [ ] Did a review by yourself.
- [ ] Added proper tests to cover this PR. (If tests are not applicable, explain.)
- [ ] Checked if this PR is a breaking (APIs have been changed) change.
- [ ] Checked if this PR will not introduce cross-platform inconsistent behavior.
- [ ] Checked if this PR would require a ReadMe/Wiki update.
Check which platforms you have built SDK on to verify the correctness of this PR.
- [ ] Linux
- [ ] Windows
- [ ] Android
- [ ] MacOS
- [ ] IOS
- [ ] Other Platforms
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.
This PR is part of trying to improve the error messages (to the same standard as boto3) that are raised from Apache Arrow when interacting with S3: https://issues.apache.org/jira/browse/ARROW-17079