Skip to content
This repository has been archived by the owner on Oct 3, 2019. It is now read-only.

[ch35481] optional view verbose_logging #17

Merged
merged 1 commit into from
Aug 27, 2019
Merged

Conversation

finalprototype
Copy link
Contributor

[ch35481]

return ClientErrorResponse("validation_error", str(e))
except exceptions.ImmediateResponseError as e:
logger.log(logging_level, f"ImmediateResponseError: {str(e)}")

Choose a reason for hiding this comment

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

Do you have an example of what these actually log?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Nope. Can remove if we'd rather wait on a use case.

Choose a reason for hiding this comment

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

I'm asking for both log lines. What does str(e) produce?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

For ValidationError, it's JSON of all validation errors found, key: field, value: reason.

{\'message\': [\'Missing data for required field.\'], \'send_live_email\': [\'Missing data for required field.\'], \'send_without_template\': [\'Missing data for required field.\'], \'template_name\': [\'Missing data for required field.\']}

@finalprototype finalprototype merged commit 0865be7 into master Aug 27, 2019
@finalprototype finalprototype deleted the fp/ch35481 branch August 27, 2019 16:40
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants