Skip to content

Fix method getLongFormPrismDID in ControllerHelper #1614

@FabioPinheiro

Description

@FabioPinheiro

Is this a regression?

No

Description

In https://github.com/hyperledger-identus/cloud-agent/blob/main/cloud-agent/service/server/src/main/scala/org/hyperledger/identus/agent/server/ControllerHelper.scala#L66-78

IMO

  • - the parameter allowUnpublished should be remove because:
    • is pointless because its hardcoded.
    • if this is set to false, it mean you only partially support the PRISM method.
  • - For the longform of did:prism the method should NOT look into the database. Because its itself contain and it doesn't need private keys.
  • - According to our specification the longform did:prism need first to try to resolver the canonical from the Blockchain because it might be published.

Please provide the exception or error you saw

2025-09-02_05:47:23.090 ERROR o.h.i.a.s.h.CustomServerInterceptors@L29:[ZScheduler-Worker-1] {} - {"status":500,"type":"error:InternalServerError","title":"Internal Server Error","detail":"An unexpected error occurred when processing the request: path=['POST /issue-credentials/credential-offers']","instance":"error:instance:0b466eba-1de1-4e52-982f-192b9d791d82"}
java.lang.RuntimeException: Longform of Prism DID cannot be found: None
        at zio.ZIO$.dieMessage$$anonfun$1(ZIO.scala:3180)
        at zio.ZIO$.failCause$$anonfun$1$$anonfun$1$$anonfun$1(ZIO.scala:3246)
        at zio.FiberRef$unsafe$$anon$2.getWith$$anonfun$1(FiberRef.scala:474)
        at zio.internal.FiberRuntime.runLoop(FiberRuntime.scala:1089)
        at zio.internal.FiberRuntime.runLoop(FiberRuntime.scala:1067)
        at zio.internal.FiberRuntime.evaluateEffect(FiberRuntime.scala:413)
        at zio.internal.FiberRuntime.evaluateMessageWhileSuspended(FiberRuntime.scala:489)
        at zio.internal.FiberRuntime.drainQueueOnCurrentThread(FiberRuntime.scala:250)
        at zio.internal.FiberRuntime.run(FiberRuntime.scala:138)
        at zio.internal.ZScheduler$$anon$3.run(ZScheduler.scala:380)

Please provide the environment you discovered this bug in

Anything else?

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions