fix sentry query

Does what is says - now retrieves the correct number of errors fro sentry