Open JoeZeng133 opened 5 months ago
if you use the tag browse node to browse a non-existent tag path, you get the following error:
JSON error: SyntaxError: Unexpected token < in JSON at position 0
it is not clear to the users what actually happened. on the ignition log, it shows a null-pointer exception. My guess is that the exception comes from this line of code if tagDescriptions becomes null https://github.com/IgnitionModuleDevelopmentCommunity/IgnitionNode-RED/blob/bbd0657455af39e6346b9b591af210dceff83a15/IgnitionNodeRED-gateway/src/main/java/org/imdc/nodered/servlet/NodeREDServlet.java#L265 I think it makes sense to handle this error and report back to users that the tag path is non-existent in the result object instead of returning 500 status code.
Fixed this issue in 1.5.16:
https://github.com/IgnitionModuleDevelopmentCommunity/IgnitionNode-RED/releases/tag/1.5.16
if you use the tag browse node to browse a non-existent tag path, you get the following error:
it is not clear to the users what actually happened. on the ignition log, it shows a null-pointer exception. My guess is that the exception comes from this line of code if tagDescriptions becomes null https://github.com/IgnitionModuleDevelopmentCommunity/IgnitionNode-RED/blob/bbd0657455af39e6346b9b591af210dceff83a15/IgnitionNodeRED-gateway/src/main/java/org/imdc/nodered/servlet/NodeREDServlet.java#L265 I think it makes sense to handle this error and report back to users that the tag path is non-existent in the result object instead of returning 500 status code.