pronamic / wp-pronamic-pay

The Pronamic Pay plugin allows you to easily accept payments with payment methods like credit card, iDEAL, Bancontact and Sofort through a variety of payment providers on your WordPress website.
https://pronamicpay.com
34 stars 14 forks source link

Logging Clientside JavaScript Errors on Server #302

Closed remcotolsma closed 1 year ago

remcotolsma commented 2 years ago

In https://github.com/pronamic/wp-pronamic-pay-adyen we have an issue where the WordPress REST API is not responding with JSON and therefore a SyntaxError occurs. We have temporarily built in the possibility to log such errors, but maybe we should make this more broadly for the future.

https://github.com/pronamic/wp-pronamic-pay-adyen/commit/92b52dd622fd90685d228e558b86304d9a2f4f7c#diff-4cd81be6906dd48d459bc1a50db631f51d6aae8c37b5fef675e27f1eb483cdb6R69-R75

POST /wp-json/pronamic-pay/v1/errors/

We could add a setting like "☑️ Log clientside JavaScript errors" or use the "Pronamic Pay debug" setting. We could also add support for logging via Google Analytics, New Relic, or other services. We can also take into account support for external logging services such as Google Analytics, New Relic, etc.

https://stackoverflow.com/questions/119432/logging-clientside-javascript-errors-on-server

remcotolsma commented 1 year ago

There has been no need for this in recent months.