grafana / kentik-app

3 stars 12 forks source link

Return message text on API error #61

Closed briangann closed 5 years ago

briangann commented 5 years ago

When making calls to the API, the plugin should also return any message returned along with the response code.

This will allow quicker troubleshooting when there are problems with authentication or an API change.

rozetko commented 5 years ago

Plugins can't affect Grafana logs as far as I know

All error messages are accessible from browser console (see screenshot) image

briangann commented 5 years ago

we can send back errors from a datasource similar to stackdriver

https://github.com/grafana/grafana/blob/4aeea563427ca9a83d7035cbbe637d49c46685ef/public/app/plugins/datasource/stackdriver/datasource.ts#L283

      appEvents.emit('ds-request-error', this.formatStackdriverError(error));
rozetko commented 5 years ago

Guess we can close it Done via https://github.com/grafana/kentik-app/pull/62

briangann commented 5 years ago

LGTM