jiajunwang opened a new issue #1928:
URL: https://github.com/apache/helix/issues/1928


   ### Describe the bug
   When fetching an empty property store zk node through the Helix rest API, 
user get this response,
   "HTTP ERROR 500 Request failed."
   
   If check the log, then we observe this error log,
   
   > Caused by: java.lang.NullPointerException
   > at java.lang.String.<init>(String.java:614) ~[?:?]
   > at 
org.apache.helix.rest.server.resources.helix.PropertyStoreAccessor.getPropertyByPath(PropertyStoreAccessor.java:82)
 ~[helix-rest-1.0.2.200.jar:?]
   
   This is not informative and does not align with what we promised that, "if 
the node is not in the required Helix ZNRecord format, the API returns content 
directly."
   
   ### To Reproduce
   Use 
"...admin/v2/namespaces/{namespace}/clusters/{cluster}/propertyStore/{path}" to 
fetch an zk node with no content.
   
   ### Expected behavior
   Throw a meaningful error message.
   Note that returning an empty string is also a possible option but it might 
be confusing. Return No content error would be clearer.
   
   ### Additional context
   Add any other context about the problem here.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to