Can you please explain about exact solution for that issue? I am requesting the NDVI for same date and same polygon. Sometimes, it shows error. When I am using the NDVI for my analysis, it shows error like this. Then how can I resolve that issue?. I need exact solution for that issue, then only I will use NDVI.
To be able to reproduce your issue, could you please specify what service you are using? Are you calling a WMS layer in an application or are you using another API? When does the error occur: for the same API call or are you changing some parameters?
These elements should help us provide an answer to your issue.
Have you tried using the RESX and RESY parameters in your WMS call, to have a control over the resolution that you are returning (see Standard GetMap request URL parameters)? This should allow you to return a meaningful resolution (say 10m for Sentinel-2) and could fix your problem (I am not familiar with the ArcGIS jsapi).