Skip to content

Commit

Permalink
Use .rethrow
Browse files Browse the repository at this point in the history
  • Loading branch information
shinyhappydan committed Oct 18, 2023
1 parent 53f2bf3 commit 717ce57
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ object ValidateResource {
validateShapes = false
).toCatsIOEither
.map(_.leftMap(ResourceShaclEngineRejection(resourceId, schemaRef, _)))
.flatMap(IO.fromEither)
.rethrow
}

private def assertNotDeprecated(schema: ResourceF[Schema]) = {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package ch.epfl.bluebrain.nexus.delta.sourcing

import cats.effect.IO
import cats.implicits.catsSyntaxMonadErrorRethrow
import ch.epfl.bluebrain.nexus.delta.sourcing.EvaluationError.EvaluationTimeout
import ch.epfl.bluebrain.nexus.delta.sourcing.execution.EvaluationExecution
import ch.epfl.bluebrain.nexus.delta.sourcing.model.EntityType
Expand All @@ -25,6 +26,5 @@ final case class EphemeralDefinition[Id, S <: EphemeralState, Command, +R <: Rej
execution.timer,
execution.contextShift
)
.flatMap(IO.fromEither)

.rethrow
}

0 comments on commit 717ce57

Please sign in to comment.