Quantcast
Channel: Active questions tagged rest - Stack Overflow
Viewing all articles
Browse latest Browse all 4123

Snaplogic Rest Post Snap: Failing with Invalid input JSON

$
0
0

I have a Json Generator snap that contains the following snippet:

{"filterGroups": [{"filters": [{"propertyName": "lastmodifieddate","operator": "GT","value":"2024-04-18T18:21:27.255Z"}]}] }

Then I have a mapper extracting the filterGroups object to pass to the RestPost snap.The Rest Post snap is configured as follows:RestPost snap configuration

I get the following error:

"error": "REST API service endpoint returned error result: status code= 400, reason phrase = Bad Request" "stacktrace": "com.snaplogic.snap.api.SnapDataException: REST API service endpointreturned error result: status code = 400\n atcom.snaplogic.snap.api.rest.RestResponseProcessor.process(RestResponseProcessor.java:380)\n atcom.snaplogic.snap.api.rest.RestRequestExecutor.execute(RestRequestExecutor.java:426)\n atcom.snaplogic.snap.api.rest.RestRequestExecutor.executeOnce(RestRequestExecutor.java:323)\n atcom.snaplogic.snap.api.rest.RestRequestExecutor.execute(RestRequestExecutor.java:190)\n atcom.snaplogic.snap.api.rest.RestRequestExecutor.execute(RestRequestExecutor.java:416)\n atcom.snaplogic.snaps.rest.RestWriteCommon.handleMultiFileUpload(RestWriteCommon.java:616)\n atcom.snaplogic.snaps.rest.Post.process(Post.java:134)\n atcom.snaplogic.snap.api.ExecutionUtil.process(ExecutionUtil.java:106)\n atcom.snaplogic.snap.api.ExecutionUtil.executeForDocument(ExecutionUtil.java:118)\n atcom.snaplogic.snap.api.ExecutionUtil.execute(ExecutionUtil.java:81)\n atcom.snaplogic.snap.api.SimpleSnap.execute(SimpleSnap.java:70)\n atcom.snaplogic.cc.snap.common.SnapRunnableImpl.executeSnap(SnapRunnableImpl.java:801)\n atcom.snaplogic.cc.snap.common.SnapRunnableImpl.executeForSuggest(SnapRunnableImpl.java:640)\n atcom.snaplogic.cc.snap.common.SnapRunnableImpl.doRun(SnapRunnableImpl.java:857)\n atcom.snaplogic.cc.snap.common.SnapRunnableImpl.call(SnapRunnableImpl.java:427)\n atcom.snaplogic.cc.snap.common.SnapRunnableImpl.call(SnapRunnableImpl.java:116)\n atjava.base/java.util.concurrent.FutureTask.run(Unknown Source)\n atjava.base/java.util.concurrent.Executors$RunnableAdapter.call(UnknownSource)\n at java.base/java.util.concurrent.FutureTask.run(UnknownSource)\n atjava.base/java.util.concurrent.ThreadPoolExecutor.runWorker(UnknownSource)\n atjava.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(UnknownSource)\n at java.base/java.lang.Thread.run(Unknown Source)\n""reason": "REST API service endpoint returned error result: statuscode = 400, reason phrase = Bad Request, refer to the error_entityfield in the error view document for more details" "resolution":"Please check the values of Snap properties." "status_code": "error""headers": {"x-content-type-options":[...],"vary":[...],"x-evy-trace-listener":[...],"x-evy-trace->virtual-host":[...],"date":[...],"access-control-allow-credentials":[...],"content->length":[...],"x-hubspot-ratelimit-daily-remaining":[...],"nel":[...],"cf-ray":[...]} "error_entity":"{"status":"error","message":"Invalid input JSON online 1, column 3: Unexpected character ('-' (code 45)) in numericvalue: expected digit (0-9) to follow minus sign, for valid numericvalue","correlationId":"8a0113b5-82ac-4e25-ae27-9380e01b3e5f"}""request_headers": [ {...} ] "statusCode": 400 "snap_details": {"label":"RESTPost","instance_id":"e9e63d7c-0606-401a-87d7-545e3a4a26d3","class_id":"com-snaplogic->snaps-rest-post","build_tag":"main25112","views":{...}} "original": { "content":{...} } } ]

The same exact content snippet works fine in Postman. I get back the correct data. I tried removing the 'T' and the 'Z' and different variations and it still fails with the same error message.

Help Please.


Viewing all articles
Browse latest Browse all 4123

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>