-
Notifications
You must be signed in to change notification settings - Fork 0
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
Generate ASABIris error for email #58
Conversation
asabiris/formatter/jinja/service.py
Outdated
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", |
There was a problem hiding this comment.
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?
asabiris/formatter/jinja/service.py
Outdated
raise ASABIrisError( | ||
ErrorCode.GENERAL_ERROR, | ||
tech_message="Error rendering template '{}': {}".format(template_path, str(e)), | ||
error_i18n_key="Error rendering '{{template_path}}': {{error_message}}.", |
There was a problem hiding this comment.
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) |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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?
asabiris/formatter/attachments.py
Outdated
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/", |
There was a problem hiding this comment.
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)
My general suggestion - for each |
@language-shprt I will consult Tech-writer. |
No description provided.