It appears that the API enforces a response size limit for Communications.makeWebRequest()
, returning a -402
error when the limit is exceeded.
Unfortunately, the documentation does not specify these limits, and behavior seems to vary between the simulator and actual devices.
In my own testing, both in the simulator and on a physical Epix 2 Pro, I was able to handle JSON responses up to 44 kB. However, another user reported encountering the -402
error with responses as small as 32 kB on a Fenix 7 Pro. Interestingly, I was able to process 44 kB responses in the simulator when targeting the same Fenix 7 Pro model.
It would be very helpful if the documentation clarified these limits—specifically:
-
What defines the response size limit?
-
Does it vary by device model, firmware version, or phone OS?
-
Are there other environmental factors that affect this?
I also tested different phone OS settings in the simulator but saw no change in behavior. That raises the question of whether the simulator accurately reflects real-world constraints. Therefore, I’d like to suggest two improvements:
-
Add detailed documentation about response size limits, including per-device guidance if applicable.
-
Ensure the simulator enforces the same size limits as the actual device, to make testing more reliable.