mirror of
				https://github.com/Unleash/unleash.git
				synced 2025-10-27 11:02:16 +01:00 
			
		
		
		
	feat: add new standard errors (#1890)
* feat: add new standard errors for 404 and 409 Co-authored-by: Thomas Heartman <thomas@getunleash.ai>
This commit is contained in:
		
							parent
							
								
									2f011f3cc3
								
							
						
					
					
						commit
						678e3f9c93
					
				| @ -11,9 +11,20 @@ const badRequestResponse = { | ||||
|     description: 'The request data does not match what we expect.', | ||||
| } as const; | ||||
| 
 | ||||
| const notFoundResponse = { | ||||
|     description: 'The requested resource was not found.', | ||||
| } as const; | ||||
| 
 | ||||
| const conflictResponse = { | ||||
|     description: | ||||
|         'The provided resource can not be created or updated because it would conflict with the current state of the resource or with an already existing resource, respectively.', | ||||
| } as const; | ||||
| 
 | ||||
| const standardResponses = { | ||||
|     400: badRequestResponse, | ||||
|     401: unauthorizedResponse, | ||||
|     404: notFoundResponse, | ||||
|     409: conflictResponse, | ||||
| } as const; | ||||
| 
 | ||||
| type StandardResponses = typeof standardResponses; | ||||
|  | ||||
		Loading…
	
		Reference in New Issue
	
	Block a user