lab5 done
This commit is contained in:
@@ -35,6 +35,9 @@ func (h *Chat) useCaseError(c echo.Context, err error) error {
|
||||
switch applicationError.Code {
|
||||
case "unsupported_media_type":
|
||||
status = http.StatusUnsupportedMediaType
|
||||
case "rate_limited":
|
||||
status = http.StatusTooManyRequests
|
||||
c.Response().Header().Set("Retry-After", "2")
|
||||
case "payload_too_large":
|
||||
status = http.StatusRequestEntityTooLarge
|
||||
case domain.ErrorUnavailable:
|
||||
|
||||
Reference in New Issue
Block a user