There can be two things that can cause downloadDocumentation to fail which may lead to cryptic errors:
No deploy was done, meaning that the REST API ID won't show up in the CFN stack.
The custom.documentation key wasn't set, meaning that it'll also not show up in the CFN stack.
IMHO, we should error when this key doesn't exist in serverless.yml and downloadDocumentation is called, and additionally mention that you should deploy the docs before calling downloadDocumentation.
There can be two things that can cause
downloadDocumentation
to fail which may lead to cryptic errors:custom.documentation
key wasn't set, meaning that it'll also not show up in the CFN stack.IMHO, we should error when this key doesn't exist in
serverless.yml
anddownloadDocumentation
is called, and additionally mention that you should deploy the docs before callingdownloadDocumentation
.