Is the error handling code in the README correct ?
Ranhiru opened this issue · comments
Jude Cooray commented
Is this still valid ?
https://github.com/plaid/plaid-node#error-handling
try {
await plaidClient.transactionsSync(request);
} catch (error) {
const err = error.response.data;
}
That part of the README has not been updated for 2 years and it seems like that part is not up to date anymore. Can someone from Plaid chime in please ?
Thank you
Chase Farmer commented
Jude Cooray commented
@cgfarmer4 Thanks you. Are there type definitions for error ? Is it PlaidError
? Or is error.response.data
is of type PlaidError ?
Chase Farmer commented
Error and response are Axios types but you are correct, error.response.data
is of type PlaidError
.
Jude Cooray commented
Thank you :)