File tree Expand file tree Collapse file tree 1 file changed +5
-9
lines changed Expand file tree Collapse file tree 1 file changed +5
-9
lines changed Original file line number Diff line number Diff line change @@ -187,17 +187,13 @@ export class VerificationService {
187
187
return getProofPresentationById ?. response ;
188
188
} catch ( error ) {
189
189
this . logger . error ( `[getProofPresentationById] - error in get proof presentation by proofId : ${ JSON . stringify ( error ) } ` ) ;
190
- const errorStack = error ?. response ?. error ?. reason ;
190
+ const errorMessage = error ?. response ?. error ?. reason || error ?. message ;
191
191
192
- if ( errorStack ) {
193
- throw new RpcException ( {
194
- message : ResponseMessages . verification . error . proofNotFound ,
195
- statusCode : error ?. response ?. status ,
196
- error : errorStack
197
- } ) ;
198
- } else {
199
- throw new RpcException ( error . response ? error . response : error ) ;
192
+ if ( errorMessage ?. includes ( 'not found' ) ) {
193
+ throw new NotFoundException ( errorMessage ) ;
200
194
}
195
+
196
+ throw new RpcException ( error . response ? error . response : error ) ;
201
197
}
202
198
}
203
199
You can’t perform that action at this time.
0 commit comments