We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 61fe37b commit 816752dCopy full SHA for 816752d
1 file changed
src/github/githubRepository.ts
@@ -178,7 +178,13 @@ export function getErrorCode(e: unknown): string | undefined {
178
}
179
180
if (typeof e.name === 'string' && e.name) {
181
- return e.name;
+ const message = typeof e.message === 'string' ? e.message : '';
182
+ if (e.name !== 'Error') {
183
+ return message ? `${e.name}: ${message}` : e.name;
184
+ }
185
+ if (message) {
186
+ return message;
187
188
189
190
return undefined;
0 commit comments