We are trying to hit API in which we are passing long base 64 encoded string, as a result, it building big payload.
In server.js file, it is failing with the error message - PayloadTooLargeError: request entity too large
Same API and payload was working in v2.2, however, in v2.3 it is failing.
Can you please suggest how to resolve this issue?
Could you share these details to check at our end?
- Timestamp of the error that happened
- Sample base64 encoded string or its total size for us to test the same
@Dev_Aditya We have tested with a string of 100k+ string and it throws the same error on both platform versions (2.2 and 2.3).
Could you share a zip file of the sample attachment that is used in the app?
If the API has other payload attributes along with this attachment string, could you share them as well?
I have shared the sample attachments and payload, in one to one message to you in your forum inbox
We will try to reproduce the error and confirm here.
we are using axios to encode attachment. I have shared the file in your inbox
We have tried a similar approach of sending a base64 string for a remote file got via the axios library and then sending via our Request Method in 2.2 and 2.3.
We have got the same error for trying out the attachments that you have shared in the private thread in both the platform versions 2.2 and 2.3. We haven’t introduced any new request body limit. It was always 100 KB (including some buffer for request metadata).
Since the attachments are dynamically sent. Some attachments might come within 100 KB and some won’t. So, if you have any set of attachments that succeeds in platform version 2.2 and fails in 2.3, please let us know and we can test and confirm with the same attachments.
The app used the Axios library to make API with base64-encoded attachments attached to the API request body. When the app is migrated to the request method on platform version 2.3, the payload size limit of 100 KB has hit and this error is faced.
For any API made from Serverless that doesn’t require the StaticIP option, can use any third-party library. So, here, we recommend continuing to use the Axios library as the same has been working previously.
Refer to this guide on how to use Axios with the latest version without ESModule support in the Freshworks apps.
This topic was automatically closed 6 days after the last reply. New replies are no longer allowed.