Closed iderdik closed 6 years ago
Thanks for the report @iderdik.
The problem is that the error message cannot be parsed anymore. I suppose that Mesosphere has changed the structure of the error JSON response (once again).
Do you have a chance to initialize your go-marathon client with the LogOutput parameter set to os.Stdout
? That way, we should see the response body.
@timoreimann I can't get that level of detail turned on in the system I'm seing this with. However, combing through Marathon logs, I do see the DELETE calling returning a 405
error if that helps.
And I've actually figured the error out (I think). When we inadvertently send a blank Marathon app name to DeleteApplication
(due to a logic error on my side), this error occurs (with the blank message). Better error handling/condition checking would definitely help here - I'll try to open a PR if I have some time.
If anyone else needs it, the offending line is: https://github.com/gambol99/go-marathon/blob/7d0d658a97e71947a2e10b136c17c26d688d337e/application.go#L759
Restart seems to have a similar issue but I haven't encountered it in practice.
Thanks for investigating.
The problem is that we currently do not decode 405s. The fix is to unmarshal such errors into a dedicated type.
Additionally, we should fall back to showing just the pure JSON content if we can't map the error any better.
I seem to have this intermittent issue where calling DeleteApplication fails with the error
"Marathon API error: "
and no additional info. Nothing appears in the Marathon logs.I'm using Marathon 1.3.0 and Mesos 1.0.1.
Have you encountered this issue at all?