Skip to content

Commit

Permalink
Fix #33
Browse files Browse the repository at this point in the history
  • Loading branch information
manonthegithub committed Jan 24, 2023
1 parent 32c53bd commit bea3fa8
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/main/scala/org/dbpedia/databus/ApiImpl.scala
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import org.dbpedia.databus.ApiImpl.Config
import org.dbpedia.databus.RdfConversions.{contextUri, generateGraphId, graphToBytes, mapContentType, readModel}
import org.dbpedia.databus.swagger.api.DatabusApi
import org.dbpedia.databus.swagger.model.{OperationFailure, OperationSuccess}
import org.eclipse.jgit.errors.RepositoryNotFoundException
import org.eclipse.jgit.errors.{MissingObjectException, RepositoryNotFoundException}
import sttp.model.Uri
import virtuoso.jdbc4.VirtuosoException

Expand Down Expand Up @@ -95,7 +95,8 @@ class ApiImpl(config: Config) extends DatabusApi {
override def getFileMapException404(e: Throwable)(request: HttpServletRequest): Option[OperationFailure] = e match {
case _: FileNotFoundException => Some(OperationFailure(e.getMessage))
case _: NoSuchFileException => Some(OperationFailure(e.getMessage))
case _: RepositoryNotFoundException => Some(OperationFailure(e.getMessage))
case _: RepositoryNotFoundException => Some(OperationFailure("File not found."))
case _: MissingObjectException => Some(OperationFailure("File not found."))
case _ => None
}

Expand Down

0 comments on commit bea3fa8

Please sign in to comment.