Details
-
Bug
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
2.7.3
Description
Ambari returns stack trace in HTML doc when an error occurs retrieving details for an Ambari View resource that does not exist.
curl -u admin:admin -X GET http://localhost:8080/api/v1/views/CAPACITY-SCHEDULER/versions/1.0.0/instances/AUTO_CS_INSTANCE/bad_resource
<html> <head> <meta http-equiv="Content-Type" content="text/html;charset=utf-8"/> <title>Error 500 Server Error</title> </head> <body><h2>HTTP ERROR 500</h2> <p>Problem accessing /api/v1/views/CAPACITY-SCHEDULER/versions/1.0.0/instances/AUTO_CS_INSTANCE/bad_resource. Reason: <pre> Server Error</pre></p><h3>Caused by:</h3><pre>java.lang.IllegalArgumentException: A resource type bad_resource for view instance CAPACITY-SCHEDULER/AUTO_CS_INSTANCE can not be found. at org.apache.ambari.server.api.services.views.ViewInstanceService.getResourceHandler(ViewInstanceService.java:326) at sun.reflect.GeneratedMethodAccessor375.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) ...