Permalink
Browse files

Made error messages consistent on setConfigXML

  • Loading branch information...
1 parent 549600a commit 36ed2f653729d56c37f8773033d76caaefb8a941 @jfederico jfederico committed Apr 5, 2013
@@ -80,6 +80,7 @@ class ApiController {
def create = {
String API_CALL = 'create'
log.debug CONTROLLER_NAME + "#${API_CALL}"
+ log.debug params
// BEGIN - backward compatibility
if (StringUtils.isEmpty(params.checksum)) {
@@ -791,8 +792,9 @@ class ApiController {
* CONFIG API
***********************************************/
def setConfigXML = {
-
- println "Handling setConfigXML"
+ String API_CALL = "setConfigXML"
+ log.debug CONTROLLER_NAME + "#${API_CALL}"
+ log.debug params
if (StringUtils.isEmpty(params.checksum)) {
invalid("checksumError", "You did not pass the checksum security check")
@@ -842,7 +844,8 @@ class ApiController {
render(contentType:"text/xml") {
response() {
returncode("FAILED")
- message("Failed to set config xml.")
+ messageKey("configXMLChecksumError")
+ message("configXMLChecksumError: request did not pass the checksum security check.")
}
}
}

0 comments on commit 36ed2f6

Please sign in to comment.