1
0
mirror of synced 2024-11-23 12:36:02 +03:00
mg-transport-telegram/src/error.go
2018-08-23 15:52:32 +03:00

16 lines
237 B
Go

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),
}
}