Skip to content

Commit

Permalink
fix: return 404 when create credConfig on non-existing issuer (hyperl…
Browse files Browse the repository at this point in the history
…edger#1379)

Signed-off-by: Pat Losoponkul <[email protected]>
  • Loading branch information
patlo-iog authored Sep 26, 2024
1 parent 8fc2fe3 commit e532ba6
Showing 1 changed file with 7 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ trait OID4VCIIssuerMetadataService {
format: CredentialFormat,
configurationId: String,
schemaId: String
): ZIO[WalletAccessContext, InvalidSchemaId | UnsupportedCredentialFormat, CredentialConfiguration]
): ZIO[WalletAccessContext, InvalidSchemaId | UnsupportedCredentialFormat | IssuerIdNotFound, CredentialConfiguration]
def getCredentialConfigurations(
issuerId: UUID
): IO[IssuerIdNotFound, Seq[CredentialConfiguration]]
Expand Down Expand Up @@ -127,8 +127,13 @@ class OID4VCIIssuerMetadataServiceImpl(repository: OID4VCIIssuerMetadataReposito
format: CredentialFormat,
configurationId: String,
schemaId: String
): ZIO[WalletAccessContext, InvalidSchemaId | UnsupportedCredentialFormat, CredentialConfiguration] = {
): ZIO[
WalletAccessContext,
InvalidSchemaId | UnsupportedCredentialFormat | IssuerIdNotFound,
CredentialConfiguration
] = {
for {
_ <- getCredentialIssuer(issuerId)
_ <- format match {
case CredentialFormat.JWT => ZIO.unit
case f => ZIO.fail(UnsupportedCredentialFormat(f))
Expand Down

0 comments on commit e532ba6

Please sign in to comment.