diff --git a/internal/core/services/claims.go b/internal/core/services/claims.go index 0d457bac8..0a1d36ffe 100644 --- a/internal/core/services/claims.go +++ b/internal/core/services/claims.go @@ -133,6 +133,11 @@ func (c *claim) CreateCredential(ctx context.Context, req *ports.CreateClaimRequ return nil, ErrLoadingSchema } + if schema.Metadata == nil { + log.Error(ctx, "schema metadata is nil", "err", ErrProcessSchema) + return nil, ErrProcessSchema + } + jsonLdContext, ok := schema.Metadata.Uris["jsonLdContext"].(string) if !ok { log.Error(ctx, "invalid jsonLdContext", "err", ErrJSONLdContext)