db: Refactor switch; NFC
This commit is contained in:
		
							parent
							
								
									a8eba1b0df
								
							
						
					
					
						commit
						104dbab335
					
				| @ -73,11 +73,7 @@ func ErrHTTPStatusCode(err error) int { | |||||||
| 	switch err { | 	switch err { | ||||||
| 	case nil: | 	case nil: | ||||||
| 		return 0 | 		return 0 | ||||||
| 	case ErrKeyInvalidChar: | 	case ErrKeyInvalidChar, ErrKeyInvalidLength, ErrPasteDoesNotExist: | ||||||
| 		return http.StatusNotFound |  | ||||||
| 	case ErrKeyInvalidLength: |  | ||||||
| 		return http.StatusNotFound |  | ||||||
| 	case ErrPasteDoesNotExist: |  | ||||||
| 		return http.StatusNotFound | 		return http.StatusNotFound | ||||||
| 	} | 	} | ||||||
| 	return http.StatusInternalServerError | 	return http.StatusInternalServerError | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user