lukeyouell / craft-sentry

Error tracking that helps developers monitor and fix crashes in real time. Iterate continuously. Boost efficiency. Improve user experience.
https://sentry.io
MIT License
17 stars 10 forks source link

Saving only API key breaks Plugin Settings Twig Template #4

Closed sergeifilippov closed 5 years ago

sergeifilippov commented 6 years ago

If you happen to save only the API key without setting up any of the other settings in the plugin settings form you will get a 500 Twig Runtime Error – Twig_Error_Runtime

Specifically;

Calling unknown method: craft\web\twig\variables\CraftVariable::Sentry()

Erro in vendor/lukeyouell/craft-sentry/src/templates/settings.twig on Line 19.

{% set projects = settings.authToken ? craft.Sentry.listProjects() : false %}

GIF or it didn't happen

sentry