deliveryhero / serverless-aws-documentation

Serverless 1.0 plugin to add documentation and models to the serverless generated API Gateway
MIT License
310 stars 148 forks source link

Provider integration is broken for serverless >2.30.3 #175

Open dls314 opened 3 years ago

dls314 commented 3 years ago

The search for error message contents from the provider call at https://github.com/deliveryhero/serverless-aws-documentation/blob/master/src/documentation.js#L107 is broken in serverless > 2.30.3 by the change here https://github.com/serverless/serverless/commit/89b813da51cedf80ca66ae4b4ad269edf8614ec0

ottopecz commented 3 years ago

The actual error object thrown by the serverless aws provider has changed in the above mentioned versions.

When expecting an error it's better to rely on something more abstract and formal than the message of the error. Good choices might include the code or the statusCode

We published a fix and we plan to maintain the package. https://www.npmjs.com/package/@kakkuk/serverless-aws-apigateway-documentation