You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jul 23, 2021. It is now read-only.
When AWS getDocumentationVersion is called and that there is no existing version for the API, the error catching is not performed properly and ends up in the error: 'Invalid Documentation version specified'
Not sure but this maybe due to a difference in the way serverless manages the error when calling AWS API.
Now the proper way to handle this is to test (err.providerError && err.providerError.code === 'NotFoundException')) instead of testing err.message === 'Invalid Documentation version specified'.
The text was updated successfully, but these errors were encountered:
bdoin
pushed a commit
to bdoin/serverless-aws-documentation
that referenced
this issue
Apr 14, 2021
The actual error object thrown by the serverless aws provider has changed in the newer versions.
The message of the thrown error has become longer although it includes the string 'Invalid Documentation version specified'
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
When AWS getDocumentationVersion is called and that there is no existing version for the API, the error catching is not performed properly and ends up in the error: 'Invalid Documentation version specified'
Not sure but this maybe due to a difference in the way serverless manages the error when calling AWS API.
Now the proper way to handle this is to test (err.providerError && err.providerError.code === 'NotFoundException')) instead of testing err.message === 'Invalid Documentation version specified'.
The text was updated successfully, but these errors were encountered: