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

private/model/api: Add docs for errors to API operations #881

Merged
merged 3 commits into from
Oct 11, 2016

Conversation

jasdel
Copy link
Contributor

@jasdel jasdel commented Oct 7, 2016

Adds docs to API operations on with the errors that could be returned by the service.

Progress note:

  • Error codes are based on the service modeled type. This may not match the error code returned by the SDK, because the SDK is given the code by the service instead of type.

@jasdel jasdel added the investigating This issue is being investigated and/or work is in progress to resolve the issue. label Oct 11, 2016
Adds additional information about inspecting the error returned by API
operations to their respective doc strings. Also includes the Error code
the SDK would return via the Error.Code interface method.
@jasdel jasdel force-pushed the feature/genAPIErrorDocs branch from 5b43185 to 1e77776 Compare October 11, 2016 19:17
@jasdel
Copy link
Contributor Author

jasdel commented Oct 11, 2016

Updated to include more friendly error list, and ensure the correct error type vs code string is added to the doc based on protocol.

_Example output added to Route53's ChangeResourceRecordSets docstring:_

Returns awserr.Error for service API and SDK errors. Use runtime type assertions with awserr.Error's Code and Message methods to get detailed information about the error.

See the AWS API reference guide for Amazon Route 53's API operation ChangeResourceRecordSets for usage and error information.

Returned Error Codes:

* NoSuchHostedZone
No hosted zone exists with the ID that you specified.

* NoSuchHealthCheck
No health check exists with the ID that you specified in the DeleteHealthCheck
request.

* InvalidChangeBatch
This exception contains a list of messages that might contain one or more
error messages. Each error message indicates one error in the change batch.

* InvalidInput
The input is not valid.

* PriorRequestNotComplete
If Amazon Route 53 can't process a request before the next request arrives,
it will reject subsequent requests for the same hosted zone and return an
HTTP 400 error (Bad request). If Amazon Route 53 returns this error repeatedly
for the same request, we recommend that you wait, in intervals of increasing
duration, before you try the request again.

@jasdel jasdel added Review Needed and removed investigating This issue is being investigated and/or work is in progress to resolve the issue. labels Oct 11, 2016
@xibz
Copy link
Contributor

xibz commented Oct 11, 2016

:shipit:

@jasdel jasdel merged commit aad2942 into aws:master Oct 11, 2016
@jasdel jasdel deleted the feature/genAPIErrorDocs branch October 11, 2016 21:29
jasdel added a commit to jasdel/aws-sdk-go that referenced this pull request Oct 12, 2016
Service Model Updates
---
* `service/ecr`: Update Amazon EC2 Container Registry service model
  * DescribeImages is a new api used to expose image metadata which today includes image size and image creation timestamp.
* `service/elasticache`: Update Amazon ElastiCache service model
  * Elasticache is launching a new major engine release of Redis, 3.2 (providing stability updates and new command sets over 2.8), as well as ElasticSupport for enabling Redis Cluster in 3.2, which provides support for multiple node groups to horizontally scale data, as well as superior engine failover capabilities

SDK Bug Fixes
---
* `aws/session`: Skip shared config on read errors (aws#883)
* `aws/signer/v4`: Add support for URL.EscapedPath to signer (aws#885)

SDK Features
---
* `private/model/api`: Add docs for errors to API operations (aws#881)
* `private/model/api`: Improve field and waiter doc strings (aws#879)
* `service/dynamodb/dynamodbattribute`: Allow multiple struct tag elements (aws#886)
* Add build tags to internal SDK tools (aws#880)
jasdel added a commit to jasdel/aws-sdk-go that referenced this pull request Oct 12, 2016
Service Model Updates
---
* `service/ecr`: Update Amazon EC2 Container Registry service model
  * DescribeImages is a new api used to expose image metadata which today includes image size and image creation timestamp.
* `service/elasticache`: Update Amazon ElastiCache service model
  * Elasticache is launching a new major engine release of Redis, 3.2 (providing stability updates and new command sets over 2.8), as well as ElasticSupport for enabling Redis Cluster in 3.2, which provides support for multiple node groups to horizontally scale data, as well as superior engine failover capabilities

SDK Bug Fixes
---
* `aws/session`: Skip shared config on read errors (aws#883)
* `aws/signer/v4`: Add support for URL.EscapedPath to signer (aws#885)

SDK Features
---
* `private/model/api`: Add docs for errors to API operations (aws#881)
* `private/model/api`: Improve field and waiter doc strings (aws#879)
* `service/dynamodb/dynamodbattribute`: Allow multiple struct tag elements (aws#886)
* Add build tags to internal SDK tools (aws#880)
@jasdel jasdel mentioned this pull request Oct 12, 2016
jasdel added a commit that referenced this pull request Oct 12, 2016
Service Model Updates
---
* `service/ecr`: Update Amazon EC2 Container Registry service model
  * DescribeImages is a new api used to expose image metadata which today includes image size and image creation timestamp.
* `service/elasticache`: Update Amazon ElastiCache service model
  * Elasticache is launching a new major engine release of Redis, 3.2 (providing stability updates and new command sets over 2.8), as well as ElasticSupport for enabling Redis Cluster in 3.2, which provides support for multiple node groups to horizontally scale data, as well as superior engine failover capabilities

SDK Bug Fixes
---
* `aws/session`: Skip shared config on read errors (#883)
* `aws/signer/v4`: Add support for URL.EscapedPath to signer (#885)

SDK Features
---
* `private/model/api`: Add docs for errors to API operations (#881)
* `private/model/api`: Improve field and waiter doc strings (#879)
* `service/dynamodb/dynamodbattribute`: Allow multiple struct tag elements (#886)
* Add build tags to internal SDK tools (#880)
@diehlaws diehlaws added needs-review This issue or pull request needs review from a core team member. and removed review-needed labels Jan 4, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs-review This issue or pull request needs review from a core team member.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants