Skip to content

Commit 7db9221

Browse files
feat(ofrep): adding error details for 401, 403 and 429 (#1361)
1 parent b9cbaf8 commit 7db9221

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

libs/shared/ofrep-core/src/lib/api/errors.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ export class OFREPApiUnauthorizedError extends OFREPApiError {
3232
super(undefined, response, message, options);
3333
Object.setPrototypeOf(this, OFREPApiUnauthorizedError.prototype);
3434
this.name = OFREPApiUnauthorizedError.name;
35+
this.message = message ?? 'OFREP request failed: unauthorized';
3536
}
3637
}
3738

@@ -40,6 +41,7 @@ export class OFREPForbiddenError extends OFREPApiError {
4041
super(undefined, response, message, options);
4142
Object.setPrototypeOf(this, OFREPForbiddenError.prototype);
4243
this.name = OFREPForbiddenError.name;
44+
this.message = message ?? 'OFREP request failed: forbidden';
4345
}
4446
}
4547

0 commit comments

Comments
 (0)