Skip to content
This repository has been archived by the owner on Apr 4, 2022. It is now read-only.

HttpStatusException should include body in the Exception #134

Open
touchdown opened this issue May 13, 2017 · 1 comment
Open

HttpStatusException should include body in the Exception #134

touchdown opened this issue May 13, 2017 · 1 comment

Comments

@touchdown
Copy link

touchdown commented May 13, 2017

can we have something like

case class HttpStatusException(
  code: Int,
  statusLine: String,
  body: String
) extends RuntimeException(code + " Error: " + statusLine +  "Body: " + body)

So we can forward the body of the exception to users from responses?
I can take that on if that makes sense

gerashegalov added a commit to gerashegalov/scalaj-http that referenced this issue Jul 16, 2018
Propagate response body to RuntimException to make sure the entire
reponse is logged. Logging usually revolves around getMessage whereas
the current code only overrides toString via Scala case class.
@gerashegalov
Copy link

we would like this addressed as well.

gerashegalov added a commit to gerashegalov/scalaj-http that referenced this issue Sep 18, 2018
Propagate response body to RuntimException to make sure the entire
reponse is logged. Logging usually revolves around getMessage whereas
the current code only overrides toString via Scala case class.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants