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

Generate ASABIris error for email #58

Merged
merged 34 commits into from
Jan 26, 2024

Conversation

mithunbharadwaj
Copy link
Contributor

No description provided.

@ateska ateska marked this pull request as draft January 18, 2024 19:12
raise ASABIrisError(
ErrorCode.TEMPLATE_NOT_FOUND,
tech_message="Failed to render. Reason : Template {} does not exist".format(template_path),
error_i18n_key="Failed to render. Reason : Template '{{incorrect_path}}' does not exist",

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll probably just keep the part "Template '{{incorrect_path}}' does not exist" - shorter and more user friendly? It will go on UI.
Reason : - extra spaces?

raise ASABIrisError(
ErrorCode.GENERAL_ERROR,
tech_message="Error rendering template '{}': {}".format(template_path, str(e)),
error_i18n_key="Error rendering '{{template_path}}': {{error_message}}.",

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

{{error_message}} - no quotation marks in the key's placeholder

"error_dict": e.ErrorDict,
"tech_err": e.TechMessage
}
return aiohttp.web.json_response(response, status=400)
Copy link

@language-shprt language-shprt Jan 23, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe add some entry to logs as well? That's where get_i18n_name method is used to add 'asab-iris|{}' to the error name.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@language-shprt Do we really need it?
It can spike unwanted alerts?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@language-shprt Can you show me an example how bs-query does it?

raise ASABIrisError(
ErrorCode.INVALID_PATH,
tech_message="Cannot render attachment: Invalid template path for '{}'. Move it to '/Templates/Attachment/'.".format(template),
error_i18n_key="Incorrect template path '{{incorrect_path}}'. Please move your templates to '/Templates/Attachment/",

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is no closing quotation mark in '/Templates/Attachment/ - it is seen on UI (please see the tests we ran)

@language-shprt
Copy link

My general suggestion - for each error_i18n_key that might appear on UI - ask our tech writer to take a look. Some wording seems a bit technical - for example, citing error types or adding notes like "undefined variable" or "error rendering" . This information should definitely go to tech_message though.

@mithunbharadwaj
Copy link
Contributor Author

@language-shprt I will consult Tech-writer.

@mithunbharadwaj mithunbharadwaj marked this pull request as ready for review January 24, 2024 12:52
@mithunbharadwaj mithunbharadwaj merged commit 208e2a4 into main Jan 26, 2024
@mithunbharadwaj mithunbharadwaj changed the title Generate ASABIris error Generate ASABIris error for email Mar 14, 2024
@mithunbharadwaj mithunbharadwaj deleted the Enhancement/Generate-Iris-Error-Messages branch March 21, 2024 08:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants