From 198df7610968d8f8dfaefb1b80891b1c38950d75 Mon Sep 17 00:00:00 2001 From: Dave Longley Date: Thu, 5 Sep 2024 15:59:40 -0400 Subject: [PATCH] Ensure OID4* errors are still logged. --- CHANGELOG.md | 5 +++++ lib/oid4/http.js | 2 ++ 2 files changed, 7 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4f14d38..e710c48 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,10 @@ # bedrock-vc-delivery ChangeLog +## 5.5.1 - 2024-09-dd + +### Fixed +- Ensure OID4* errors are still logged. + ## 5.5.0 - 2024-09-05 ### Changed diff --git a/lib/oid4/http.js b/lib/oid4/http.js index 9042c14..2da59c5 100644 --- a/lib/oid4/http.js +++ b/lib/oid4/http.js @@ -12,6 +12,7 @@ import { import {asyncHandler} from '@bedrock/express'; import bodyParser from 'body-parser'; import cors from 'cors'; +import {logger} from './logger.js'; import {UnsecuredJWT} from 'jose'; import {createValidateMiddleware as validate} from '@bedrock/validation'; @@ -374,6 +375,7 @@ export async function createRoutes({ } function _sendOID4Error({res, error}) { + logger.error(error.message, {error}); const status = error.details?.httpStatusCode ?? 500; const oid4Error = { error: _camelToSnakeCase(error.name ?? 'OperationError'),