-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
More detailed transformation error output #476
Comments
What other details do you want in the error message? I don't think it will be possible to include the line+column numbers of the template in the error |
That would be ultime. But the original resource name, as a separate attribute in the exception would be a great start... |
Could you clarify? It looks like the original resource name |
Good one, I'll take a look at the code. I'll get back on this ASAP 👍 |
Hmm.. I does look like the Logical Id is in some of the exceptions, which I didn't realize. The I think the exceptions can be modeled better though. Right now the error that is returned when you transform is
While I understand this may be hard for the service to do this, but locally this is possible. This can provide richer details and help customers quickly find the resources or conflicts that are in the template. I think it is worth while to at least explore what this is and how we could possible support it, even if we don't end up adding it for whatever reason. |
Got some more details:
Returns:
There is a For cfn-lint the resource name could sufficient, we can handle that locally. A bit more contextual enrichment in the Exceptions would make it (even) more useful for customers. |
If the transformations generate pretty basic errors, for example the following "error":
Generates the following Transformation error:
It would be great if there errors can be extended with additional information so we can trace the error back to the actual resource/property (or perhaps even the line/column number) of the original SAM template that gave the error.
The transformations and a (more) detailed error output is really valuable for consomers like SAM-CLI (to perform the "validate" function), but also by the (new) CloudFormation Linter (cfn-python-lint).
This would allow consumers of SAM to give better and more direct feedback on errors in the SAM/CloudFormation template and make the usage of SAM easier.
Extending the
InvalidDocumentException
(I think this is the place where it could/should be added) with this information would be really appreciated:https://github.com/awslabs/serverless-application-model/blob/master/samtranslator/model/exceptions.py
The text was updated successfully, but these errors were encountered: