In case of Jenkins REST calls (I experienced with copy job and delete job), the response which comes from Jenkins is not very rich. If request execution results into an error because of some wrong parameters, client doesn’t get much information about the type of error while CLI gives exact error message which can be very helpful for an end user.
For example, when I am deleting a job via REST call and providing a job name that doesn’t exist, I am getting a response code of 404 and a chunk of html data. But when I am executing the same workflow with CLI, I am getting stderr like “No such job JPEG-123 exists. Perhaps you meant JPEG-2?” This type of proper error message will help end user to know what went wrong. As per my understanding and research this is how Jenkins REST APIs behave. Please correct me if I am wrong. If anybody have any workaround available for this, please let me know. That would be very helpful and greatly appreciated. Thanks in advance. -- View this message in context: http://jenkins-ci.361315.n4.nabble.com/REST-vs-CLI-error-responses-for-Jenkins-tp4679965.html Sent from the Jenkins issues mailing list archive at Nabble.com. -- You received this message because you are subscribed to the Google Groups "Jenkins Issues" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/groups/opt_out.
