File tree Expand file tree Collapse file tree 4 files changed +20
-4
lines changed Expand file tree Collapse file tree 4 files changed +20
-4
lines changed Original file line number Diff line number Diff line change 1
1
# Stage 1: Build the application
2
2
FROM node:18-alpine as build
3
3
# Install OpenSSL
4
+ RUN apk update && apk upgrade
4
5
RUN apk add --no-cache openssl
5
6
RUN set -eux \
6
7
&& apk --no-cache add \
@@ -37,6 +38,7 @@ RUN pnpm run build agent-provisioning
37
38
# Stage 2: Create the final image
38
39
FROM node:18-alpine as prod
39
40
# Install OpenSSL
41
+ RUN apk update && apk upgrade
40
42
RUN apk add --no-cache openssl
41
43
RUN set -eux \
42
44
&& apk --no-cache add \
Original file line number Diff line number Diff line change @@ -12,8 +12,6 @@ export class CustomExceptionFilter extends BaseExceptionFilter {
12
12
13
13
let errorResponse ;
14
14
let status = HttpStatus . INTERNAL_SERVER_ERROR ;
15
-
16
- this . logger . error ( `exception ::: ${ JSON . stringify ( exception ) } ` ) ;
17
15
18
16
if ( ! exception || '{}' === JSON . stringify ( exception ) ) {
19
17
errorResponse = {
Original file line number Diff line number Diff line change @@ -310,10 +310,26 @@ export class VerificationService {
310
310
return getProofPresentationById ?. response ;
311
311
}
312
312
} catch ( error ) {
313
+ // Handle cases where identical attributes are used in both predicates and non-predicates.
314
+ // This case is not supported in credo-ts, so we are handling in platform
315
+ // TODO: Handle all credo-errors globally in platform
316
+
317
+ const errorMessage = error ?. status ?. message ?. error ?. message ;
318
+ const match = errorMessage ?. match (
319
+ / C r e d o E r r o r : T h e p r o o f r e q u e s t c o n t a i n s d u p l i c a t e p r e d i c a t e s a n d a t t r i b u t e s : ( .+ ) /
320
+ ) ;
321
+ if ( match ) {
322
+ const [ , duplicateAttributes ] = match ;
323
+ throw new RpcException ( {
324
+ message : `CredoError: The proof request contains duplicate attributes: ${ duplicateAttributes } ` ,
325
+ statusCode : 500
326
+ } ) ;
327
+ }
328
+
313
329
this . logger . error ( `[sendProofRequest] - error in sending proof request: ${ JSON . stringify ( error ) } ` ) ;
314
330
this . verificationErrorHandling ( error ) ;
331
+ }
315
332
}
316
- }
317
333
318
334
319
335
/**
Original file line number Diff line number Diff line change @@ -17,7 +17,7 @@ import {
17
17
intercept ( context : ExecutionContext , next : CallHandler ) : Observable < unknown > {
18
18
return next . handle ( ) . pipe (
19
19
catchError ( ( error ) => {
20
- if ( error . message . includes ( ResponseMessages . nats . error . natsConnect ) ) {
20
+ if ( error ?. message && error ? .message . includes ( ResponseMessages . nats . error . natsConnect ) ) {
21
21
this . logger . error ( `No subscribers for message: ${ error . message } ` ) ;
22
22
return throwError ( ( ) => new HttpException ( ResponseMessages . nats . error . noSubscribers , 500 ) ) ;
23
23
}
You can’t perform that action at this time.
0 commit comments