Add Sentry logging to API calls
## What does this MR do?
This MR adds support for Sentry logging in the API.
## Are there points in the code the reviewer needs to double check?
Since the `Grape::Middleware` doesn't have a `params` method, I had to define one using the Rack Request.
## Why was this MR needed?
We are missing a lot of useful errors in the API causing git push/pull errors
## What are the relevant issue numbers?
#21043
See merge request !5882