#mangala0687
1 messages · Page 1 of 1 (latest)
Hello! Do you have a question about this error?
I'm looking at the linked error description now... ok, it looks like I need to investigate a little deeper what my code is doing
Yeah, doing this is a non-minified environment should provide more useful information.
is there a way I can get a non-minified environment? the build is controlled by stripe apps run
Can you provide more context? Where are you seeing this error? What code throws this error?
I'm developing a stripe app and at one point when handling the response to an api call the app goes blank, in debugging it I see that the ContextView is unmounting
Which API call?
3rd-party api, what's confusing is the network request for the api call is successful and the response is as expected, but for some reason this error gets thrown
Can you share the code you're using to make the request and handle the response?
checkInfo: paymentInfo as PhysicalCheckInfo,
signal,
token,
})
.then(handleResponse)
.catch(handleError);
type: 'digital' | 'physical',
checkInfo: DigitalCheckInfo | PhysicalCheckInfo,
token: TokenData,
signal: AbortSignal,
) => {
const url = `${getBaseUrl()}/v3/check/${type}`;
const body = JSON.stringify({
name: checkInfo.name,
recipient: checkInfo.recipient,
amount: checkInfo.amount,
description: checkInfo.description,
});
const response = await fetch(url, {
method: 'POST',
body,
headers: {
Authorization: `Bearer ${token.access_token}`,
'Content-Type': 'application/json',
},
signal: signal,
});
if (response.ok) {
console.log('response was ok')
return (await response.json()) as SendCheckResponse;
}
throw new Error(await response.text());
}; ```
What does handleResponse look like?
console.log('handleResponse')
setSentPaymentInfo({
...paymentInfo,
response,
});
// increment by the number of fields using formVersion in SendPayment.tsx
// necessary to increment the key value so the fields are re-rendered and clear their values
setFormVersion(formVersion + 2);
setCurrentFocusView('Sent')
};
What does setSentPaymentInfo look like?
it's from useState