1
0
mirror of synced 2024-11-28 22:46:02 +03:00
mg-transport-telegram/src/error.go

16 lines
237 B
Go
Raw Normal View History

2018-08-23 15:52:32 +03:00
package main
import (
"net/http"
)
type ErrorResponse struct {
Error string `json:"error"`
}
func BadRequest(error string) (int, interface{}) {
return http.StatusBadRequest, ErrorResponse{
Error: getLocalizedMessage(error),
}
}