AnsweredAssumed Answered

Finesse API Error Format

Question asked by a.malhotra.brightcloud on May 15, 2015
Latest reply on May 15, 2015 by a.malhotra.brightcloud

As per the finesse developer guide:

[quote]

Each error includes a failure response, error type, error message, and error data. The following is an example

of a failure message format:

 

<ApiErrors>

<ApiError>

<ErrorType>Authentication Failure</ErrorType>

<ErrorMessage>UNAUTHORIZED</ErrorMessage>

<ErrorData>jsmith</ErrorData>

</ApiError>

</ApiErrors>

[/quote]

 

However, we are getting API error as HTML and not in above described format.

 

For example, When we do GET Method on USER URI by providing incorrect authorization we are getting this on error stream:

 

<!-- custom Cisco error page --><html>    <head>        <title>            Cisco System - Error report        </title>        <style type="text/css">            a {                color: #316984;                text-decoration: none;            }            a:hover {                color: #316984;                text-decoration: underline;            }            a:visted {                color: #316984;                text-decoration: none;            }            body {                background-attachment: fixed;                background-color: #ffffff;                background-repeat: no-repeat;                color: #316984;                font-family: arial,helvetica,sans-serif;            }            #content {                border: 1px solid #d6d7d6;                font-size: 93.5%;                margin: 0px 10% 30px 10%;            }            #content-header {                background-color: #eeeeee;                border-bottom: 1px solid #666666;                color: #666666;                font-size: 124.5%;                padding: 5px 15px 5px 15px;            }            #copyright {                font-size: 75%;                margin: 0px 10% 0px 10%;                padding: 3px 0px 0px 0px;                text-align: right;            }            img {                display: block;                margin: 0px 0px 20px 0px;            }            #logo {                margin: 30px 10% 0px 10%;            }            p {                padding: 5px 15px 5px 15px;            }            pre {                padding: 5px 15px 5px 30px;            }        </style>    </head>    <body>        <div id="logo">            <img src="/ciscologo.gif" alt="Cisco Systems, Inc." />        </div>        <div id="content">            <div id="content-header">HTTP Status 401 -             </div>            <p>                <b>                    type:               </b> Status report            </p>            <p>                <b>message:               </b>             </p>            <p>                <b>description:               </b> This request requires HTTP authentication ().            </p>        </div>    </body></html>

Outcomes