platform
platform copied to clipboard
fix:Incorrect error message displayed for duplicate DID creation in organization wallet
Description: When attempting to create a duplicate DID in the organization wallet, an incorrect error message is displayed. Instead of providing a clear and meaningful error message indicating that the DID already exists, the system returns a generic message: "Something went wrong!" along with a 500 status code
Method
POST/v1/orgs/{orgId}/agents/did (Create new DID)
Request { "seed": "IuC96B_UkJa-1Q2K1832zqHs-4RgxTyn", "keyType": "ed25519", "method": "indy", "network": "indicio:demonet", "role": "endorser", "isPrimaryDid": false }
Steps to Reproduce
- Attempt to create a DID that already exists in the organization wallet.
- Observe the response.
Current behavior { "statusCode": 500, "message": "Something went wrong!", "error": "CredoError: Key already exists" }
Expected behavior
{ "statusCode": 409, "message": "DID already exist", "error": "Conflict" }
Screenshot
Hey I would like to work on this issue. Can you please assign this to me? Thanks.
Hey I would like to work on this issue. Can you please assign this to me? Thanks.
Thanks @pallavi704 for picking this up.
Hey @ajile-in , thanks. I will submit the PR once I finish the testing in my local.