Add new error

This commit is contained in:
Brendan Abolivier 2017-09-01 13:09:31 +01:00
parent 9f3078e32b
commit 858442d8cc
No known key found for this signature in database
GPG key ID: 8EF1500759F70623

View file

@ -104,3 +104,12 @@ func LimitExceeded(msg string, retryAfterMS int64) *LimitExceededError {
RetryAfterMS: retryAfterMS,
}
}
// NotTrusted is an error which is returned when the client asks the server to
// proxy a request (e.g. 3PID association) to a server that isn't trusted
func NotTrusted(serverName string) *MatrixError {
return &MatrixError{
ErrCode: "M_SERVER_NOT_TRUSTED",
Err: fmt.Sprintf("Untrusted server '%s'", serverName),
}
}