cancel
Showing results for 
Search instead for 
Did you mean: 

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

AdrianH
New Contributor II

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 6

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
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
New Contributor II

Hi,

I initially used the browser to check the web service was accessible, but now I’m using Postman to make the call and pass in the input data and getting the error in both cases.

Thanks for the prompt response.

The pipeline reference is:

https://elastic.snaplogic.com/sl/designer.html?pipe_runtime_id=be2ad26c-7644-42b4-a458-a6b6c0f0990d

Yours,

Adrian

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