feat(backend): Added endpoint to fetch HTML version of learning object (from Dwengo backend)
Also refactored a bit to make this easier.
This commit is contained in:
parent
770c5c9879
commit
18ee991ce3
16 changed files with 264 additions and 178 deletions
21
backend/src/exceptions.ts
Normal file
21
backend/src/exceptions.ts
Normal file
|
@ -0,0 +1,21 @@
|
|||
/**
|
||||
* Exception for HTTP 400 Bad Request
|
||||
*/
|
||||
export class BadRequestException extends Error {
|
||||
public status = 400;
|
||||
|
||||
constructor(error: string) {
|
||||
super(error);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Exception for HTTP 404 Not Found
|
||||
*/
|
||||
export class NotFoundException extends Error {
|
||||
public status = 404;
|
||||
|
||||
constructor(error: string) {
|
||||
super(error);
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue