Question

JSON parse error when submitting request to API

  • 27 January 2023
  • 0 replies
  • 13 views

Hello!

Upon performing a z.request() to upload a file to my API, I get this error back:

"Could not parse request body into json: Could not parse payload into json: Unexpected character ('-' (code 45)) in numeric value: expected digit (0-9) to follow minus sign...”

I do not get this error if I include no form data in the request. Does anyone know a fix for this? My code is basically the default “uploadFile_v10” from the example app except with my URL substituted in.


This post has been closed for comments. Please create a new post if you need help or have a question about this topic.