Red Hat Bugzilla – Bug 814444
[REST API] Return specific error code from server when Jenkins cart can't be added
Last modified: 2012-06-08 13:59:39 EDT
When the user attempts to add a Jenkins client without a Jenkins server, the REST API should return a unique exit code and clean message to the caller. Currently the message from the server is:
Failed to add jenkins-client-1.4 to application test1 : Node execution failure (invalid exit code from node). If the problem persists please contact Red Hat support.. Details : --DEBUG-- Cartridge return code: 151 --RESULT-- --MESSAGE-- --ERROR-- Jenkins server does not exist! Please create with rhc app create -t jenkins-1.4 --APP INFO-- --CART COMMANDS-- --DATA-- --EXIT CODE-- 151
and the status code is 143 which is generic. We should return 151 (if it's not reserved) and reserve it as "You cannot add a jenkins client until you add the jenkins server to the application". We do not need the suggested application creation flow in the error - both the client and server can handle that.
We can't enable Jenkins in the UI until we have this.
It is fixed in devenv_1778.