Skip to content

Commit df181cc

Browse files
committed
Expose credential status check error message.
1 parent 38014bd commit df181cc

2 files changed

Lines changed: 18 additions & 0 deletions

File tree

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
# bedrock-vc-verifier ChangeLog
22

3+
## 23.5.0 - 2025-12-dd
4+
5+
### Added
6+
- Expose credential status check error message.
7+
38
## 23.4.0 - 2025-11-20
49

510
### Added

lib/status.js

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,19 @@ export function createCheckStatus({config} = {}) {
110110
};
111111
return await handlers.checkStatus(options);
112112
} catch(error) {
113+
if(!(error instanceof BedrockError)) {
114+
// always expose cause message and name; expose cause details as
115+
// BedrockError if error is marked public
116+
const details = error.details?.public ? error.details : {};
117+
error = new BedrockError(error.message, {
118+
name: error.name || 'OperationError',
119+
details: {
120+
...details,
121+
public: true
122+
},
123+
cause: error
124+
});
125+
}
113126
return {verified: false, error};
114127
}
115128
};

0 commit comments

Comments
 (0)