You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The API request method uses the fetch function to call the back-end API. The method was developed to support SSL pinning but its support has been commented out (here and there)
There is an important difference between JavaScript fetch and the one provided by react-native-ssl-pinning package: how HTTP error status is managed.
JavaScripts fetch does not reject on HTTP error status even if the response is an HTTP 404 or 500; it normally resolves the promise. On the other hand, the one provided by react-native-ssl-pinning returns a rejected promise.
The request method was originally developed to work with SSL pinning's version, so all HTTP errors are managed in the catch block (it uses async/awaitand rejected promises throw an exception). Now that the import of that fetch is commented out, the vanilla version is used and the error management code in the catch block is not executed.
The text was updated successfully, but these errors were encountered:
The API
request
method uses thefetch
function to call the back-end API. The method was developed to support SSL pinning but its support has been commented out (here and there)There is an important difference between JavaScript
fetch
and the one provided byreact-native-ssl-pinning
package: how HTTP error status is managed.JavaScripts
fetch
does not reject on HTTP error status even if the response is an HTTP 404 or 500; it normally resolves the promise. On the other hand, the one provided byreact-native-ssl-pinning
returns a rejected promise.The
request
method was originally developed to work with SSL pinning's version, so all HTTP errors are managed in thecatch
block (it usesasync
/await
and rejected promises throw an exception). Now that theimport
of thatfetch
is commented out, the vanilla version is used and the error management code in thecatch
block is not executed.The text was updated successfully, but these errors were encountered: