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

NOISSUE - Remove debugging message from response of handle error function #696

Merged
merged 2 commits into from
Apr 8, 2019

Conversation

blokovi
Copy link
Contributor

@blokovi blokovi commented Apr 5, 2019

Signed-off-by: Ivan Milošević [email protected]

What does this do?

Remove debugging message that explains what went wrong with JSON decoder from response of handle error function. Mainflux version on dashboard display that response, so it's swiched to nice error message instead of huge debug.

Which issue(s) does this PR fix/relate to?

No issue

@blokovi blokovi added the UI label Apr 5, 2019
@@ -25,4 +25,4 @@ handle error =
"Bad status: " ++ String.fromInt code

Http.BadBody err ->
err
"Invalid response body"
Copy link
Contributor

Choose a reason for hiding this comment

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

Is the error however printed in a browser console, so we can debug problems?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

No, but that's a good idea so I print it in console in new commit 4a5f929
Because you can't have any side-effects in Elm you will see that I have to do a bit of a trick for logging values that I don't want to return.

Copy link
Contributor

Choose a reason for hiding this comment

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

We'll need to have some kind of better developed failure reporting mechanism to user. For now, user can inspect browser console and MF console messages. LGTM

@codecov-io
Copy link

codecov-io commented Apr 5, 2019

Codecov Report

Merging #696 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@          Coverage Diff           @@
##           master    #696   +/-   ##
======================================
  Coverage    86.3%   86.3%           
======================================
  Files          62      62           
  Lines        3723    3723           
======================================
  Hits         3213    3213           
  Misses        353     353           
  Partials      157     157

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 12a85f5...4a5f929. Read the comment docs.

@nmarcetic nmarcetic requested a review from darkodraskovic April 8, 2019 09:32
Copy link
Contributor

@darkodraskovic darkodraskovic left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Contributor

@drasko drasko left a comment

Choose a reason for hiding this comment

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

LGTM

@drasko drasko merged commit 98d588e into absmach:master Apr 8, 2019
davide83 pushed a commit to davide83/mainflux that referenced this pull request May 13, 2019
…tion (absmach#696)

* Remove debugging message from response of handle error function

Signed-off-by: Ivan Milošević <[email protected]>

* Print error in debug console in case of bad body HTTP response

Signed-off-by: Ivan Milošević <[email protected]>
@blokovi blokovi deleted the NOISSUE-badbody branch May 24, 2019 09:56
rugwirobaker pushed a commit to rugwirobaker/mainflux that referenced this pull request Jun 26, 2019
…tion (absmach#696)

* Remove debugging message from response of handle error function

Signed-off-by: Ivan Milošević <[email protected]>

* Print error in debug console in case of bad body HTTP response

Signed-off-by: Ivan Milošević <[email protected]>
manuio pushed a commit that referenced this pull request Oct 12, 2020
…tion (#696)

* Remove debugging message from response of handle error function

Signed-off-by: Ivan Milošević <[email protected]>

* Print error in debug console in case of bad body HTTP response

Signed-off-by: Ivan Milošević <[email protected]>
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.

4 participants