Internal Server Error (500) when invoking /present-proof/presentations
Is this a regression?
No
Description
I encountered an issue while attempting to invoke the /present-proof/presentations endpoint. The request fails with a 500 Internal Server Error. Below are the details of the request and the error response. Start the Identus Cloud Agent.
Use the following curl command to send a POST request to /present-proof/presentations
curl --location
--request POST 'http://localhost:9000/cloud-agent/present-proof/presentations'
--header 'Content-Type: application/json'
--data-raw '{
"connectionId": "1a1d1da9-f1e8-412e-9412-c0aadf5a15d1",
"proofs": [
{
"schemaId": "https://example.com/driving-license-1.0.0",
"trustIssuers": [
"did:prism:b2be2535ef463d4c1e7903ee97fc62a20494621c2f72fb52f1c8fed8b9d5b436"
]
}
],
"options": {
"challenge": "A challenge for the holder to sign",
"domain": "domain.com"
}
}'
Please provide the exception or error you saw
The server returns a 500 Internal Server Error with the following response:
{
"status": 500,
"type": "error:InternalServerError",
"title": "Internal Server Error",
"detail": "An unexpected error occurred when processing the request: path=['POST /present-proof/presentations']",
"instance": "error:instance:ad2564bc-d53b-4c52-8b7a-8f4131b4f153"
}
Please provide the environment you discovered this bug in
Identus Cloud Agent version: 1.36.1
OS: Ubuntu 22.04
Anything else?
The connectionId provided is valid and in an active state as per the /connections endpoint response. The schema and trusted issuer DIDs are configured correctly in the system.
@Neethu-Muthu
I am not sure why you get that error
I have tested this on cloud-agent 1.40.0
post {{baseUrlVerifier}}/present-proof/presentations
{
"connectionId": "{{VERIFIER_CONNECTION_ID}}",
"proofs": [
{
"schemaId": "{{baseUrl}}/schema-registry/schemas/{{SCHEMA_ID}}",
"trustIssuers": [
"{{ISSUER_DID_SHORT}}"
]
}
],
"options": {
"challenge": "11c91493-01b3-4c4d-ac36-b336bab5bddf",
"domain": "https://prism-verifier.com"
}
}
response 201 created
{
"presentationId": "b4ed2082-daf3-435b-a470-86b725ea32a1",
"thid": "e7ed6dd4-f14a-4a55-a19f-f18cbb47f77d",
"role": "Verifier",
"status": "RequestPending",
"proofs": [],
"data": [],
"requestData": [
"{\"options\":{\"challenge\":\"11c91493-01b3-4c4d-ac36-b336bab5bddf\",\"domain\":\"https://prism-verifier.com\"},\"presentation_definition\":{\"id\":\"a35b1ee5-e747-47d5-b0e8-63f5168a3124\",\"input_descriptors\":[]}}"
],
"connectionId": "2cd706df-6b3e-420e-8dfd-83ccc5e51a91",
"metaRetries": 5
}
I have tested with your payload just using the my connectionId
{
"connectionId": "2cd706df-6b3e-420e-8dfd-83ccc5e51a91",
"proofs": [
{
"schemaId": "https://example.com/driving-license-1.0.0",
"trustIssuers": [
"did:prism:b2be2535ef463d4c1e7903ee97fc62a20494621c2f72fb52f1c8fed8b9d5b436"
]
}
],
"options": {
"challenge": "A challenge for the holder to sign",
"domain": "domain.com"
}
}
response was 201 created
{
"presentationId": "20de8340-9dee-4de2-aa24-1bc40eba0043",
"thid": "bc0e2108-9181-451a-a502-2aef87703a94",
"role": "Verifier",
"status": "RequestPending",
"proofs": [],
"data": [],
"requestData": [
"{\"options\":{\"challenge\":\"A challenge for the holder to sign\",\"domain\":\"domain.com\"},\"presentation_definition\":{\"id\":\"ec290cf6-5675-46f3-8658-73d080940e31\",\"input_descriptors\":[]}}"
],
"connectionId": "2cd706df-6b3e-420e-8dfd-83ccc5e51a91",
"metaRetries": 5
}
@Neethu-Muthu I cannot reproduce this issue please see above
i think this is related to #1537 , did you pass the API key in the headers? @Neethu-Muthu
Closing the ticket as we cannot reproduce the issue, and there has been no reply from the reporter, @Neethu-Muthu.