so I created a fastapi app and uploaded it to azure as a web app. Now im trying to test one of the endpoints as a post request in postman that recieves an audio file, and 2 params. But as I run it, I recieve an error: Error: read ECONNRESET (from postmans console), and as a response: { "detail": "There was an error parsing the body" }
and this log from the azure log stream: 2024-03-17T19:02:36.7547238Z WARNING: Did not find boundary character 206 at index 2 2024-03-17T19:02:36.7549282Z INFO: 169.254.129.1:12719 - "POST /transcribe?song_name=wait&singer=hadar HTTP/1.1" 400 Bad Request
The postman calls for the other endpoint works (a simple get that returns a success message) Also the same post endpoint runs localy and also directly from docker.
I tried to test the endpoint in postman and it couldnt parse the request body (that contains an audio file)
This error occurs if the request body is not in the correct format or too large. Reduce the data that is being sent in the request.
Check the request body to make sure that it is in the correct format and none of the required fields are missed.
In Postman, select form-data and type as File and upload the audio file.
This error occurs if the connection was reset while reading data or the invalid format of request body.
The boundary character is used to separate the different parts of a multipart/form-data request body.
Deploy the application to Azure again through a different way (VSCode or Azure CLI) and check the logs of the Azure App Service for the complete error details: Also increase the timeout value for the client.
Azure App Service=>Application Logging=>Select File System.Azure App Service=>Log Stream: