owenvoke / laravel-dashboard-cloudflare-stats-tile

A tile for Laravel Dashboard that displays statistics from Cloudflare
https://packagist.org/packages/owenvoke/laravel-dashboard-cloudflare-stats-tile
MIT License
11 stars 2 forks source link

Log Errors #4

Open ahosker opened 4 years ago

ahosker commented 4 years ago

I now understand my Generated API Key from CloudFlare did not work and had to use the global API key.

Nothing in logs from this package, saying it failed for authentication. I had to head into package and dd($response) in Cloudflare class to see what was going on.

Please report errors to log file?

owenvoke commented 4 years ago

This would be good. 🤔 I don't really use Laravel Dashboard at all anymore, so I've been focussing my time on other projects. However, I'll try and have a look at this.

At the very least, we should use throw()->json() here: https://github.com/owenvoke/laravel-dashboard-cloudflare-stats-tile/blob/098e0cb01f26121b8fc0579b510cd0cfd98cf4e3/src/Services/Cloudflare.php#L40