Scott Feldstein created HHQ-5768:
-
Summary: Streaming API - Error message for endpoint status needs to be worked on
Key: HHQ-5768
URL: https://jira.hyperic.com/browse/HHQ-5768
Project: Hyperic HQ
Issue Type: Bug
Components: API
Affects Versions: 5.7
Reporter: Scott Feldstein
Assignee: Mayan Weiss
Priority: Critical
When a user checks the endpoint status and the registrationId is not valid the current error mechanism doesn't expose any useful information.
scenarios
1) api user asks for status a registrationId=0, but that is not valid.
Current behavior: returns an unstructured error message.
Desired behavior: return a structured response,
e.g.
<?xml version="1.0" encoding="UTF-8" standalone="yes"?><ns2:endpointStatus xmlns:ns2="http://vmware.com/hyperic/hq/api/rest/v1"><!-- NEEDS TO INCLUDE AN ERROR MESSAGE which is specific --><statusResponse status="INVALID" message="registrationId 0 is not a valid registrationId"></statusResponse></ns2:endpointStatus>
2) registrationId exists but is not associated with an Endpoint
<?xml version="1.0" encoding="UTF-8" standalone="yes"?><ns2:endpointStatus xmlns:ns2="http://vmware.com/hyperic/hq/api/rest/v1"><ns2:statusResponse status="INVALID" message="registrationId 0 is a valid registrationId but is not registered to an endpoint"></ns2:statusResponse></ns2:endpointStatus>
3) registrationId 0 exists but the endpoint is having problems
<?xml version="1.0" encoding="UTF-8" standalone="yes"?><ns2:endpointStatus xmlns:ns2="http://vmware.com/hyperic/hq/api/rest/v1"><ns2:statusResponse status="ERROR" message="<Error message which contains the actual exception message from the http POST failure>" last-failure="1364415694206" last-successful="0" creationTime="<timeInMillis>"/></ns2:endpointStatus>
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://jira.hyperic.com/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira