Skip to content

Commit

Permalink
add support for CDSE catalog style error message
Browse files Browse the repository at this point in the history
  • Loading branch information
jdries committed Aug 22, 2024
1 parent ff5cc3f commit 49af490
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ abstract class OpenSearchClient {
if(response.contentType.contains("application/json") || response.contentType.contains("application/geo+json;charset=UTF-8")) {
io.circe.parser.parse(response.body) match {
case Left(failure) => throw new IOException(s"Exception while evaluating catalog request $url: ${response.body}")
case Right(json) => throw new IOException(s"Exception while evaluating catalog request $url: ${json.findAllByKey("exceptionText").mkString(";")} ")
case Right(json) => throw new IOException(s"Exception while evaluating catalog request $url: ${json.findAllByKey("exceptionText").mkString(";")}${json.findAllByKey("ErrorMessage").mkString(";")} ")
}

throw new IOException(s"$url returned an empty body")
Expand Down

0 comments on commit 49af490

Please sign in to comment.