Skip to content

Commit

Permalink
fix wrong err code #35
Browse files Browse the repository at this point in the history
  • Loading branch information
manonthegithub committed Jan 10, 2024
1 parent bedf90f commit ecf4fb9
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/main/scala/org/dbpedia/databus/ApiImpl.scala
Original file line number Diff line number Diff line change
Expand Up @@ -125,10 +125,10 @@ class ApiImpl(config: Config) extends DatabusApi {
override def saveFileMapException400(e: Throwable)(request: HttpServletRequest): Option[OperationFailure] = e match {
case _: JenaException => Some(OperationFailure(e.getMessage))
case _: VirtuosoException if e.getMessage.contains("SQ200") => Some(OperationFailure(s"Wrong value for type. ${e.getMessage}"))
case _: RuntimeException if e.getCause.isInstanceOf[VirtuosoException] && e.getMessage.contains("SQ200") =>
Some(OperationFailure(s"Wrong value for type. ${e.getMessage}"))
case _: RuntimeException if e.getCause.isInstanceOf[VirtuosoException] && e.getMessage.contains("SQ074") =>
Some(OperationFailure(s"Wrong input data. ${e.getMessage}"))
case _: RuntimeException if e.getCause.isInstanceOf[VirtuosoException] && e.getCause.getMessage.contains("SQ200") =>
Some(OperationFailure(s"Wrong value for type. ${e.getCause.getMessage}. ${e.getMessage}"))
case _: RuntimeException if e.getCause.isInstanceOf[VirtuosoException] && e.getCause.getMessage.contains("SQ074") =>
Some(OperationFailure(s"Wrong input data. ${e.getCause.getMessage}. ${e.getMessage}"))
case _ => None
}

Expand Down

0 comments on commit ecf4fb9

Please sign in to comment.