Change the default reply code for an invalid subsystem to 400 BadRequest instead of 404 NoContent.

This commit is contained in:
Ken Moore
2016-02-09 09:57:50 -05:00
parent f775458d31
commit 787369def3

View File

@@ -91,7 +91,7 @@ RestOutputStruct::ExitCode WebSocket::EvaluateBackendRequest(const RestInputStru
}else{
QJsonObject avail;
AvailableSubsystems(IN.fullaccess, &avail);
if(!avail.contains(namesp+"/"+name)){ return RestOutputStruct::NOTFOUND; }
if(!avail.contains(namesp+"/"+name)){ return RestOutputStruct::BADREQUEST; }
}
//Go through and forward this request to the appropriate sub-system