feat: server error exception type toegevoegd
This commit is contained in:
		
							parent
							
								
									9c638b11f6
								
							
						
					
					
						commit
						94a8456bdd
					
				
					 1 changed files with 12 additions and 0 deletions
				
			
		
							
								
								
									
										12
									
								
								backend/src/exceptions/server-error-exception.ts
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										12
									
								
								backend/src/exceptions/server-error-exception.ts
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,12 @@ | ||||||
|  | import { ExceptionWithHttpState } from "./exception-with-http-state"; | ||||||
|  | 
 | ||||||
|  | /** | ||||||
|  |  * Exception for HTTP 500 Internal Server Error | ||||||
|  |  */ | ||||||
|  | export class ServerErrorException extends ExceptionWithHttpState { | ||||||
|  |     status = 500; | ||||||
|  | 
 | ||||||
|  |     constructor(message = 'Internal server error, something went wrong') { | ||||||
|  |         super(500, message); | ||||||
|  |     } | ||||||
|  | } | ||||||
		Reference in a new issue
	
	 Adriaan Jacquet
						Adriaan Jacquet