question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Provide Smithy models for default API Gateway errors

See original GitHub issue

Whenever we deploy our services using API Gateway from AWS, there are errors that we have no control over (as described here). The details of those errors are needed in order to allow the proper deserialization within the client SDKs. We have tried to solve this with two different approaches, although without success:

  1. By defining the model for them ourselves, but we have not been able to find what are the possible X-Amzn-ErrorType HTTP headers that are being sent by API Gateway. The closest possibility can apparently be found here.
  2. By overriding the X-Amzn-ErrorType HTTP header using the OpenAPI extension x-amazon-apigateway-gateway-responses. That caused the header to be sent two times containing our override value BadRequestException and the default value IncompleteSignatureException from API Gateway (as shown in the attached image). The client SDK does not seem to like that, and simply ignore our value. Screenshot 2022-04-03 at 19 52 12

Is is possible for AWS to provide the Smithy models only of those default API Gateway errors (similar to this here), please?

Issue Analytics

  • State:open
  • Created a year ago
  • Reactions:1
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
gosarcommented, Sep 6, 2022

@eduardomourar @DanielBauman88 are you unblocked with the change to js repo?

On the Smithy side, we’d still want to add a protocol test for this, so other language SDKs can also support this. So leaving this issue open for that followup.

0reactions
DanielBauman88commented, Sep 6, 2022

This does unblock me.

Appreciate you keeping this open - would be great to have the same support for all the supported languages!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Working with models and mapping templates - Amazon API ...
In API Gateway models are defined using the JSON schema draft 4 . ... If no model is provided, API Gateway uses the...
Read more >
Amazon API Gateway traits - Smithy 1.0
If it is greater than 0, API Gateway will cache authorizer responses. If this field is not set, the default value is 300....
Read more >
Scaling APIs with Smithy - Michael Dowling, Amazon Web ...
Scaling APIs with Smithy - Michael Dowling, Amazon Web ServicesSpeakers: Michael DowlingAWS builds SDKs in 9 programming languages for over ...
Read more >
AWS Core Specification - Smithy 2.0 - Open Source at AWS
The cloudFormationName property is a string value that specifies the AWS CloudFormation service name (e.g., ApiGateway ). When not set, this value defaults...
Read more >
Get detailed error messages from AWS API Gateway Request ...
(Developer on API Gateway). Unfortunately, this is not supported right now. We are actively working on fixing this issue, but I can't give...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found