Uploaded image for project: 'Ambari'
  1. Ambari
  2. AMBARI-25204

Ambari returns stack trace in HTML doc when an error occurs retrieving details for an Ambari View resource that does not exist

    XMLWordPrintableJSON

Details

    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)
      ...
      

      Attachments

        Activity

          People

            dmitriusan Dmitry Lysnichenko
            rlevas Robert Levas
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Time Tracking

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0h
                0h
                Logged:
                Time Spent - 2h 50m
                2h 50m