def _is_api(request): ''' Checks if the error comes from the api ''' return request.blueprint == 'api' or 'api' in request.url