Skip to content

Commit

Permalink
Remove unused Error type
Browse files Browse the repository at this point in the history
  • Loading branch information
jnatten committed Oct 9, 2024
1 parent 8987dac commit ee9de27
Showing 1 changed file with 2 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -15,21 +15,12 @@ import no.ndla.network.model.HttpRequestException
import no.ndla.network.tapir.{AllErrors, TapirErrorHelpers}
import no.ndla.search.{IndexNotFoundException, NdlaSearchException}
import org.postgresql.util.PSQLException
import sttp.tapir.Schema.annotations.description

import java.time.LocalDateTime

@description("Information about an error")
case class Error(
@description("Code stating the type of error") code: String,
@description("Description of the error") description: String,
@description("When the error occured") occuredAt: LocalDateTime = LocalDateTime.now()
)
trait ErrorHelpers extends TapirErrorHelpers {
this: Props with Clock with DataSource =>

import ConceptErrorHelpers._
import ErrorHelpers._
import ConceptErrorHelpers.*
import ErrorHelpers.*

override def handleErrors: PartialFunction[Throwable, AllErrors] = {
case a: AccessDeniedException => forbiddenMsg(a.getMessage)
Expand Down

0 comments on commit ee9de27

Please sign in to comment.