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

Print Display rather than Debug forms of errors #546

Merged
merged 1 commit into from
Nov 21, 2019
Merged

Conversation

tjkirch
Copy link
Contributor

@tjkirch tjkirch commented Nov 21, 2019

The Debug form doesn't include the 'display' information specified in the error
enum, including the source error, so we were losing context.


This uses the same main wrapper that we had elsewhere, but more consistently, so we see the full display form.

Testing done:

Unit tests pass.

Before, you'd see an error like this on the console; it's the Debug form, without the source error.

ip-192-168-107-131 login: [   44.077462] moondog[2899]: Error: APIRequest { method: "PATCH", uri: "/settings", source: ResponseStatus { code: 400, uri: unix://2f72756e2f6170692e736f636b:0/settings } }

After, you see an error like this; the Display form with the source error for context. (This is for a new error I'm adding in the next PR - spoilers!)

ip-192-168-96-10 login: [   36.633092] moondog[2906]: Error sending PATCH to /settings: Status 400 when requesting unix://2f72756e2f6170692e736f636b:0/settings: Json deserialize error: Unable to deserialize into KubernetesClusterName: Given invalid cluster name 'https://SNIP.yl4.us-west-2.eks.amazonaws.com': cluster names must be valid Kubernetes label values at line 1 column 1562

The Debug form doesn't include the 'display' information specified in the error
enum, including the source error, so we were losing context.
Copy link
Contributor

@zmrow zmrow left a comment

Choose a reason for hiding this comment

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

🏋

@tjkirch tjkirch merged commit 4dcda39 into develop Nov 21, 2019
@tjkirch tjkirch deleted the display-errors branch November 21, 2019 21:25
@iliana iliana added this to the v0.2.0 milestone Nov 21, 2019
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