| Summary: | Misleading error about invalid manifest | ||
|---|---|---|---|
| Product: | [ECD] Orion | Reporter: | John Arthorne <john.arthorne> |
| Component: | Deployment | Assignee: | Maciej Bendkowski <maciej.bendkowski> |
| Status: | RESOLVED FIXED | QA Contact: | |
| Severity: | normal | ||
| Priority: | P3 | CC: | maciej.bendkowski, Mike_Wilson, Szymon.Brandys |
| Version: | unspecified | Flags: | Szymon.Brandys:
review+
|
| Target Milestone: | 5.0 RC2 | ||
| Hardware: | PC | ||
| OS: | Windows 7 | ||
| Whiteboard: | |||
McQ reported seeing this too. We really have to step up our game when it comes to error reporting. For any message that a user is likely to ever see, it has to be informative, understandable, and correctly match the situation they are actually in. If it takes more context to be able to do that, then modify the pattern so the needed info is passed in. Every time we report an incorrect error message (particularly one that is so obviously incorrect) it makes the user think we don't understand what we're doing. Not good. Proposed fix: https://git.eclipse.org/r/#/c/22097/ Added syntax error detection and simple semantic error handling. The error messages are more descriptive and try to indicate what (and possibly where) seems to be a problem. For a more robust error handling strategy, we require a better manifest parser, see bug 428351. Szymon, please review via Gerrit. |
I20140207 When performing a CF push I received a message like this: "Corrupted or unsupported manifest format" However previous pushes with exact same manifest had succeeded. We are likely returning a wrong/misleading message here. It looks like this is caused by a bad coding pattern in validateParams in the following classes: BindRouteCommand CreateApplicationCommand CreateRouteCommand All of these have catch block like this: } catch (Exception ex) { /* parse exception, fail */ String msg = "Corrupted or unsupported manifest format"; return new ServerStatus(IStatus.ERROR, HttpServletResponse.SC_BAD_REQUEST, msg, null); } So user is told their manifest is bad regardless of what the exception is. We need to give a more specific message about what is wrong on JSONException. For a generic exception catch we should be logging it, and returning a message that doesn't make user think it is their fault ("Unknown error occurred during cf command" or similar).