Skip to content
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

Export: Collect and report all tag errors to users #31

Open
romifz opened this issue Sep 26, 2020 · 3 comments
Open

Export: Collect and report all tag errors to users #31

romifz opened this issue Sep 26, 2020 · 3 comments

Comments

@romifz
Copy link

romifz commented Sep 26, 2020

When using several tags in a report and the report generation fails because of an incorrect parameter in a tag, it may be difficult to find the tag that causes the failure.

I believe that, instead of failing, it would be useful to replace the failing tag with an error message so it would be easy to locate.

@hrubyjan
Copy link

Pelican now reports the problems (hopefully it is detailed enough and understandable) directly in the application and provides links to the template which contains errors.

Replacement in the document can be a problem when the final document has tens of pages. In such case the change that you would miss some problem is quite high. Is't better to not produce final document and fix the template first.

@sabahfromlondon
Copy link

I've seen two things worth reporting here:

  1. If there are multiple errors in the template, the error message will only feedback on the first error it sees. For instance the attached screenshot, I made sure there were two errors in the template I used

  2. The error message is specific about the error only to a certain extent. I removed a space and the error message came back with "All characters must be alphabetic." It will however help users to discover where the error exists.

Screen Shot 2020-10-22 at 14 30 44

@jpmckinney jpmckinney reopened this Nov 3, 2020
@jpmckinney jpmckinney transferred this issue from open-contracting-archive/pelican Sep 14, 2021
@jpmckinney
Copy link
Member

(2) We no longer bother the check for alphabetic tag names. This error will now pass that check with the interpretation that the full string is the "tag name". It will then error with "The tag '[tag]' is not recognized. Please check the spelling and syntax.".

For (1), a template tag can perhaps collect error messages and pass these up, similar to how it collects failed_tags for CheckNotComputedError.

@jpmckinney jpmckinney changed the title Report generation: print an error message when tag is incorrect Export: Collect and report all tag errors to users Jan 26, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants