Skip to content
This repository was archived by the owner on Jul 31, 2025. It is now read-only.

service/route53: Add batched error support for ChangeResourceRecordSets - #593

Merged
jasdel merged 3 commits into
masterfrom
pr438Route53UnmarshalError
Mar 16, 2016
Merged

jasdel merged 3 commits into
masterfrom
pr438Route53UnmarshalError

Conversation

@jasdel

@jasdel jasdel commented Mar 15, 2016

Copy link
Copy Markdown
Contributor

service/route53: Add batched error support for ChangeResourceRecordSets
Adds support for batched errors that ChangeResourceRecordSets can
optionally return.

Replaces PR #438

Also deprecate BatchError in favor of BatchedErrors
BatchError did not satisfy the awserr.Error interface like it should of. This
update adds a new type BatchedErrors which satisfies awserr.Error.

Comment thread aws/awserr/types.go Outdated
// needed, use BatchError
// OrigErr returns the original error if one was set. Nil is returned if no
// error was set. This only returns the first element in the list. If the full
//list is needed, use BatchedErrors.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Odd spacing on comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks will update that.

@xibz

xibz commented Mar 16, 2016

Copy link
Copy Markdown
Contributor

Was the BatchedErrors.OrigError() not going to concatenate the error strings? Or just return the first one in the list?

@xibz

xibz commented Mar 16, 2016

Copy link
Copy Markdown
Contributor

Should probably add a leak test to the unit tests

@jasdel

jasdel commented Mar 16, 2016

Copy link
Copy Markdown
Contributor Author

I was considering how best to represent BatchedErrors.OrigError() other than just another batched error. I'm thinking as a error type which also has a OrigErrs method. What do you think.

For the leak test, not sure what to test there, there are no io.Read/Writers nor channels. What were you thinking should be tested?

@xibz

xibz commented Mar 16, 2016

Copy link
Copy Markdown
Contributor

Yea, that makes sense, was just curious because it seems there would be more use in OrigErrs than in the OrigErr. So, I was thinking of concate the error messages together and returning that as a single error. However, after some thought, it may not be useful, since you can just call OrigErrs.

Yea, I agree for the leak test there wouldn't be much to test there, but was thinking of having complete coverage of the services that have custom marshalers may be nice.

@jasdel

jasdel commented Mar 16, 2016

Copy link
Copy Markdown
Contributor Author

Ah I see, for some reason I was thinking you meant for the error change. Yeah that makes sense for the route53 unmarshaller. I'll add that.

jasdel added 3 commits March 16, 2016 16:15
BatchError did not satisfy the awserr.Error interface like it should of. This
update adds a new type BatchedErrors which satisfies awserr.Error.
Adds support for batched errors that ChangeResourceRecordSets can
optionally return.

Fix #438

Unmarshaling and tests provided by @abustany
@jasdel
jasdel force-pushed the pr438Route53UnmarshalError branch from c0c8442 to 481a64c Compare March 16, 2016 23:33
@jasdel

jasdel commented Mar 16, 2016

Copy link
Copy Markdown
Contributor Author
  • Added more robust baseError.OrigErr handling so it can return more comprehensive values.
  • Added leak tests for custom unmarshaller

@xibz

xibz commented Mar 16, 2016

Copy link
Copy Markdown
Contributor

LGTM, :shipit:

jasdel added a commit that referenced this pull request Mar 16, 2016
service/route53: Add batched error support for ChangeResourceRecordSets
@jasdel
jasdel merged commit 6913213 into master Mar 16, 2016
@jasdel
jasdel deleted the pr438Route53UnmarshalError branch March 16, 2016 23:48
jasdel added a commit that referenced this pull request Mar 18, 2016
xibz pushed a commit to xibz/aws-sdk-go that referenced this pull request Apr 18, 2016
xibz pushed a commit to xibz/aws-sdk-go that referenced this pull request Apr 18, 2016
skotambkar pushed a commit to skotambkar/aws-sdk-go that referenced this pull request May 20, 2021
Fixes aws#557 by removing out dated example documentation from the SDK's
endpoints package and README. The feature to enumerate regions and
services was removed in aws#512 pending further design and development of
service specific endpoint metadata.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants