You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ambari.apache.org by "Srimanth Gunturi (JIRA)" <ji...@apache.org> on 2014/09/08 22:01:28 UTC

[jira] [Created] (AMBARI-7210) BE: Stack advisor scripts should report python errors in API

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)