Skip to content

Commit

Permalink
chore: Add IRI to error message when a Group IRI is invalid. (#3296)
Browse files Browse the repository at this point in the history
  • Loading branch information
BalduinLandolt authored Jun 25, 2024
1 parent 23292ff commit 923a7b0
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ object GroupIri extends StringValueCompanion[GroupIri] {
def from(value: String): Either[String, GroupIri] = value match {
case _ if value.isEmpty => Left("Group IRI cannot be empty.")
case _ if isGroupIriValid(value) => Right(GroupIri(value))
case _ => Left("Group IRI is invalid.")
case v => Left(s"Group IRI is invalid: $v")
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ object GroupIriSpec extends ZIOSpecDefault {
"http://rdfh.ch/groups/jDEEitJESRi3pDaDjjQ1WQ",
),
)
check(invalidIris)(i => assertTrue(GroupIri.from(i) == Left(s"Group IRI is invalid.")))
check(invalidIris)(i => assertTrue(GroupIri.from(i) == Left(s"Group IRI is invalid: $i")))
},
)
}

0 comments on commit 923a7b0

Please sign in to comment.