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 Sipi Error Message When status != 0 #266

Closed
tobiasschweizer opened this issue Sep 16, 2016 · 0 comments · Fixed by #287
Closed

Print Sipi Error Message When status != 0 #266

tobiasschweizer opened this issue Sep 16, 2016 · 0 comments · Fixed by #287
Assignees
Labels
enhancement improve existing code or new feature
Milestone

Comments

@tobiasschweizer
Copy link
Contributor

SipiResponderV1.scala auf Zeile 170:

// check if Sipi returned a status code != 0
            _ = if (statusCode != 0) {
                val sipiErrorMessage: String = responseAsMap.getOrElse("message", throw SipiException(message = "Sipi did not return an error message although status is != 0")) match {
                    case JsString(msg) => msg
                    case other => throw SipiException(message = s"Sipi did not return a correct status code, but ${other.toString()}")
                }
                throw BadRequestException(s"Sipi returned a HTTP 200 status code, but an unsuccessful status code ${statusCode} with message with error message ${sipiErrorMessage}")
            }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement improve existing code or new feature
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant