Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Log errors in response to Sync requests #3131

Closed
JakePT opened this issue Nov 14, 2022 · 0 comments · Fixed by #3133
Closed

Log errors in response to Sync requests #3131

JakePT opened this issue Nov 14, 2022 · 0 comments · Fixed by #3133
Assignees
Milestone

Comments

@JakePT
Copy link
Contributor

JakePT commented Nov 14, 2022

Is your enhancement related to a problem? Please describe.
When the Sync page sends an AJAX request to sync, if the response is not valid JSON the apiFetch function catches an error when parsing the JSON an throws a generic error message. This can make debugging for customers somewhat more difficult.

Describe the solution you'd like
Replace apiFetch with a regular fetch() implementation and log error responses to the console when parsing JSON before throwing a generic error message.

@JakePT JakePT added this to the 4.4.0 milestone Nov 14, 2022
@JakePT JakePT self-assigned this Nov 14, 2022
@JakePT JakePT assigned felipeelia and unassigned JakePT Nov 15, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants