Repository navigation
Conversation
Signed-off-by: Aadiii00 <adityapammannavaryt@gmail.com>
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 33 minutes. View limit detailsLimit details: You’ve used the included review currently available. Review configuration: ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (2)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|




Closes #1227
Description
When creating a duplicate DID in an organization wallet via
POST /v1/orgs/{orgId}/agents/did, the underlying agent returnedCredoError: Key already exists, which fell through to a generic 500 "Something went wrong!" error instead of returning 409 Conflict with a clear message.This PR catches duplicate key/DID errors during DID creation in
AgentServiceServiceand throws anRpcExceptionwith status 409, message"DID already exist", and error"Conflict".Changes
createDiderror handling inAgentServiceServiceto identify duplicate key/DID errors and return 409 Conflict.checkDidExistenceto throwConflictExceptionwith standard conflict error structure.agent-service.service.spec.tsverifying both Credo duplicate key errors and database duplicate DID scenarios.