Skip to content

Commit

Permalink
Ensure OID4* errors are still logged.
Browse files Browse the repository at this point in the history
  • Loading branch information
dlongley committed Sep 5, 2024
1 parent a5690b6 commit 198df76
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 2 additions & 0 deletions lib/oid4/http.js
Original file line number Diff line number Diff line change
Expand Up @@ -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';

Expand Down Expand Up @@ -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'),
Expand Down

0 comments on commit 198df76

Please sign in to comment.