You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

24 lines
499 B

package error
import "net/http"
type InvalidJID string
// Error for complying the error interface
func (e InvalidJID) Error() string {
return string(e)
}
// ErrCode will return the error code based on the error data type
func (e InvalidJID) ErrCode() string {
return "INVALID_JID"
}
// StatusCode will return the HTTP status code based on the error data type
func (e InvalidJID) StatusCode() int {
return http.StatusBadRequest
}
const (
ErrInvalidJID = InvalidJID("your JID is invalid")
)