mirror of
https://github.com/CommunitySolidServer/CommunitySolidServer.git
synced 2024-10-03 14:55:10 +00:00
feat: Default error code to HTTP status code.
This commit is contained in:
@@ -63,6 +63,10 @@ describe('HttpError', (): void => {
|
||||
expect(instance.errorCode).toBe(options.errorCode);
|
||||
});
|
||||
|
||||
it('defaults to an HTTP-specific error code.', (): void => {
|
||||
expect(new constructor().errorCode).toBe(`H${statusCode}`);
|
||||
});
|
||||
|
||||
it('sets the details.', (): void => {
|
||||
expect(instance.details).toBe(options.details);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user