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

Incomplete Field Mapping for S3ControlException via S3ControlClient.createJob() #1986

Closed
LukeHornibrookHaventec opened this issue Aug 13, 2020 · 2 comments
Labels
bug This issue is a bug. closed-for-staleness

Comments

@LukeHornibrookHaventec
Copy link

Describe the bug

A failed request to S3ControlClient.createJob() results in an S3ControlException with null message and error code. However, the API response body has the expected <Code> and <Message> elements, eg:

<Error><Code>InvalidRequest</Code><Message>Invalid job manifest</Message><RequestId>****</RequestId><HostId>****</HostId></Error>

Expected Behavior

The response should be marshalled to an InvalidRequestException (or equivalent based on the error code) and the AwsErrorDetails fully populated.

Steps to Reproduce

Call S3ControlClient.createJob() with only the accountId populated, eg:

S3ControlClient.create().createJob(x -> {
	x.accountId("123456789012");
});

Possible Solution

Hopefully there is a generalised solution that could resolve other related issues, eg #1983.

Your Environment

  • AWS Java SDK version used: 2.13.41
@LukeHornibrookHaventec LukeHornibrookHaventec added bug This issue is a bug. needs-triage This issue or PR still needs to be triaged. labels Aug 13, 2020
@debora-ito
Copy link
Member

Thank you for reporting @LukeHornibrookHaventec, I can reproduce it. Although I see a

<Code>InvalidRequest</Code><Message>Missing role arn</Message>...

with the sample code you provided, I think it falls under the same issue with unmarshalling.

@cenedhryn
Copy link
Contributor

@LukeHornibrookHaventec
This issue is now fixed; you will get an S3ControlException back with an InvalidRequest error code.

@cenedhryn cenedhryn added the closing-soon This issue will close in 4 days unless further comments are made. label Feb 5, 2021
@github-actions github-actions bot added closed-for-staleness and removed closing-soon This issue will close in 4 days unless further comments are made. labels Feb 10, 2021
aws-sdk-java-automation added a commit that referenced this issue Apr 8, 2022
…d5a83fc54

Pull request: release <- staging/730d028d-5287-4ca6-a418-f91d5a83fc54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug This issue is a bug. closed-for-staleness
Projects
None yet
Development

No branches or pull requests

3 participants