Skip to content

Commit 1a65a81

Browse files
Merge pull request #1109 from credebl/develop-dco-fixed
Sync changes from DEV to QA (22/01/2024)
2 parents 497c306 + 880a715 commit 1a65a81

File tree

4 files changed

+20
-4
lines changed

4 files changed

+20
-4
lines changed

Dockerfiles/Dockerfile.agent-provisioning

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
# Stage 1: Build the application
22
FROM node:18-alpine as build
33
# Install OpenSSL
4+
RUN apk update && apk upgrade
45
RUN apk add --no-cache openssl
56
RUN set -eux \
67
&& apk --no-cache add \
@@ -37,6 +38,7 @@ RUN pnpm run build agent-provisioning
3738
# Stage 2: Create the final image
3839
FROM node:18-alpine as prod
3940
# Install OpenSSL
41+
RUN apk update && apk upgrade
4042
RUN apk add --no-cache openssl
4143
RUN set -eux \
4244
&& apk --no-cache add \

apps/api-gateway/common/exception-handler.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,6 @@ export class CustomExceptionFilter extends BaseExceptionFilter {
1212

1313
let errorResponse;
1414
let status = HttpStatus.INTERNAL_SERVER_ERROR;
15-
16-
this.logger.error(`exception ::: ${JSON.stringify(exception)}`);
1715

1816
if (!exception || '{}' === JSON.stringify(exception)) {
1917
errorResponse = {

apps/verification/src/verification.service.ts

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -310,10 +310,26 @@ export class VerificationService {
310310
return getProofPresentationById?.response;
311311
}
312312
} 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+
/CredoError: The proof request contains duplicate predicates and attributes: (.+)/
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+
313329
this.logger.error(`[sendProofRequest] - error in sending proof request: ${JSON.stringify(error)}`);
314330
this.verificationErrorHandling(error);
331+
}
315332
}
316-
}
317333

318334

319335
/**

libs/interceptors/nats.interceptor.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ import {
1717
intercept(context: ExecutionContext, next: CallHandler): Observable<unknown> {
1818
return next.handle().pipe(
1919
catchError((error) => {
20-
if (error.message.includes(ResponseMessages.nats.error.natsConnect)) {
20+
if (error?.message && error?.message.includes(ResponseMessages.nats.error.natsConnect)) {
2121
this.logger.error(`No subscribers for message: ${error.message}`);
2222
return throwError(() => new HttpException(ResponseMessages.nats.error.noSubscribers, 500));
2323
}

0 commit comments

Comments
 (0)