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
When validating user input errors, the type of "error" returned by recurly.token in this example, recurly.token(formRef.current, (error, token) => {} does not match the RecurlyError type defined by Recurly.js .
recurly.token errors have this structure:
{"name": "validation","code": "validation","message": "There was an error validating your request.","fields": ["number","month","year"],"details": [{"field": "number","messages": ["is invalid"]},{"field": "month","messages": ["is invalid"]},{"field": "year","messages": ["is invalid"]}]}
Issue:
When validating user input errors, the type of "error" returned by
recurly.token
in this example,recurly.token(formRef.current, (error, token) => {}
does not match theRecurlyError
type defined by Recurly.js.
recurly.token
errors have this structure:RecurlyError is defined by Recurly.js as:
When using TypeScript, this causes compilation errors if you try to handle the actual response from Recurly.js.
To Reproduce
The bug can be reproduced by inputting an invalid credit card expiry date in the React Recurly demo page and checking the console output.
Expected behavior
The returned error matches the type defined by
Recurly.js
Your Environment
The text was updated successfully, but these errors were encountered: