Don't return invalid JSON if node not found
This commit is contained in:
parent
e7dec994b8
commit
f68ae55068
1 changed files with 2 additions and 2 deletions
|
@ -58,8 +58,8 @@ bool JsonUriHandler::handleGetRequest( const HTTPRequest & request, HTTPResponse
|
|||
SGPropertyNode_ptr node = fgGetNode( string("/") + propertyPath );
|
||||
if( false == node.valid() ) {
|
||||
response.StatusCode = 400;
|
||||
response.Content = "Node not found: " + propertyPath;
|
||||
SG_LOG(SG_NETWORK,SG_WARN, "Node not found: '" << response.Content << "'");
|
||||
response.Content = "{}";
|
||||
SG_LOG(SG_NETWORK,SG_WARN, "Node not found: '" << propertyPath << "'");
|
||||
return true;
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue