Forum Discussion

AdrianH's avatar
AdrianH
New Contributor II
9 years ago

Getting a 500 when post some raw json to a triggered pipeline

I’m using postman to test the service, but also get this error when calling it through the browser.

Access-Control-Allow-Credentials →true
Access-Control-Allow-Headers →authorization, x-date, Content-Type, if-none-match
Access-Control-Allow-Methods →GET, POST, OPTIONS, PUT, DELETE
Access-Control-Max-Age →17600
Connection →keep-alive
Content-Length →250
Content-Type →application/json
Date →Wed, 26 Apr 2017 08:34:34 GMT
Server →nginx/1.10.1
X-SL-StatusCode →500
passing in a json file as raw

Anyone had experience of this error, anyhelp much appreciated.

6 Replies

  • AdrianH's avatar
    AdrianH
    New Contributor II

    To fix this I dropped off a JSON parser snap that was sitting in front of a copy, the copy is now the first snap in the pipeline with an open input and I’m no longer getting the 500 error.

  • eguo's avatar
    eguo
    Former Employee

    @AdrianH, when open the trigger task url with a browser, the browser is making a HTTP GET request. GET request doesn’t submit a request body. Postman can do POST request with a body.

    For this 500 status case, what do you see in the pipeline run log?

  • ncrouch's avatar
    ncrouch
    Former Employee

    This is likely the first snap in the pipeline failing due to no input - as per @eguo’s response, you’re not Posting anything when you do it through the browser.

    Would be good to see the pipeline logs and the pipeline itself to confirm, however.

  • AdrianH's avatar
    AdrianH
    New Contributor II

    Here’s my latest effort, I cut down the json to something a little more manageable :

    {“Sourceidentification”:{“countryid”:“AAA”,“areaname”:“Somewhere”,“systemname”:“TOffice”},“Filemetadata”:{“rowcount”:“320”,“checksum”:“9424ADEABBFC7DFE7AF18DFFCB97C0FE”},“measurements”:{“distance”:[{“vehicleid”:“AB123CD”,“value”:“123456”,“document”:“20160419141000”,“date”:“2016-04-18”,“Time”:“”}]}}

    {
    “query_string”: “”,
    “path”: “/api/1/rest/slsched/feed/xxxxxx/xxx/xxxxxxxxx/Measurements”,
    “response_map”: {
    “error_list”: [
    {
    “message”: “Pipeline failed to execute.”
    }
    ]
    },
    “http_status”: “500 Internal Server Error”,
    “http_status_code”: 500