ambari-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Srimanth Gunturi (JIRA)" <j...@apache.org>
Subject [jira] [Created] (AMBARI-7210) BE: Stack advisor scripts should report python errors in API
Date Mon, 08 Sep 2014 20:01:28 GMT
Srimanth Gunturi created AMBARI-7210:
----------------------------------------

             Summary: BE: Stack advisor scripts should report python errors in API
                 Key: AMBARI-7210
                 URL: https://issues.apache.org/jira/browse/AMBARI-7210
             Project: Ambari
          Issue Type: Task
          Components: ambari-server
    Affects Versions: 1.7.0
            Reporter: Srimanth Gunturi
            Assignee: Srimanth Gunturi
             Fix For: 1.7.0


If anything goes wrong in the stack-advisor scripts, it should be propagated to the API response
so that the user can take appropriate action. 

For example in script's main() I threw an exception
{code}
raise StackAdvisorException("I will fail!")
{code}
However the API response was 
{code}
400 - Bad Request
Error occured during stack advisor command invocation
{code}

Any _StackAdvisorException_ means a semantic issues, and should be reported as {{400-Bad Request
<message>}}. 

Any other exceptions should be returned as {{500-Internal Server Error <message>}}.

Any other types of failures should also be accounted for (compilation issues, NPEs, etc.)



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message