Closed amagyar-iohk closed 2 weeks ago
@amagyar-iohk has the agent been fixed? Because the agent responds no valid JSON objects when some exceptions occur.
If you could validate this it would be great.
If the Agent does not respond with a valid json object then, we could set a default JSON object or error instead of undefined. But the point is that the agent should ALWAYS return valid json objects, no matter what happened, mainly because we are requesting appliication/json objects in the header... but its returning something diff
Yes, this is the api response for the scenario which the piuri
is wrong
ApiResponse {
headers: Headers {
'content-length': '271',
'content-type': 'application/json',
date: 'Tue, 22 Oct 2024 12:12:55 GMT'
},
body: {
status: 422,
type: 'error:DIDCommControllerError:UnsupportedPIURI',
title: 'Unsupported P I U R I',
detail: 'The Protocol Identifier URI (URI) found in the DIDComm message is not supported: PIURI=potato',
instance: 'error:instance:ae85af1e-53ee-41ae-9afc-63f05bb17556'
},
status: 422,
statusText: 'Unprocessable Entity'
}
@amagyar-iohk what shall we do with this?
This is going to be closed as we didn't implement the didcomm error report in agent yet
Is this a regression?
Yes
Description
Brief
When didcomm message returns a
http status code
other thanok
the message becomes undefined due a try-catch block. This issue's goal is to enable an error management for didcomm errors. Spec: https://identity.foundation/didcomm-messaging/spec/#problem-reportsFetchApi.ts
Mercury.ts
Any
ApiError
thrown will cause message to returnundefined
as per described in theMercury.ts#sendMessageParseMessage
methodPlease provide the exception or error you saw
No response
Please provide the environment you discovered this bug in
No response
Anything else?
No response