1
0
Fork 0

Adding compatibility for marathon 1.5

This commit is contained in:
Trevin Teacutter 2018-07-03 16:42:03 -05:00 committed by Traefiker Bot
parent 461ebf6d88
commit 04d8b5d483
35 changed files with 2257 additions and 63 deletions

View file

@ -42,6 +42,8 @@ const (
ErrCodeServer
// ErrCodeUnknown specifies an unknown error.
ErrCodeUnknown
// ErrCodeMethodNotAllowed specifies a 405 Method Not Allowed.
ErrCodeMethodNotAllowed
)
// InvalidEndpointError indicates a endpoint error in the marathon urls
@ -82,6 +84,8 @@ func NewAPIError(code int, content []byte) error {
errDef = &simpleErrDef{code: ErrCodeForbidden}
case code == http.StatusNotFound:
errDef = &simpleErrDef{code: ErrCodeNotFound}
case code == http.StatusMethodNotAllowed:
errDef = &simpleErrDef{code: ErrCodeMethodNotAllowed}
case code == http.StatusConflict:
errDef = &conflictDef{}
case code == 422: