Skip to content

Recognize unknown Cube API errors and pass them through to the UI

Allen Cook requested to merge 403038-allow-all-unhandled-cube-api-errors into master

What does this MR do and why?

Add the ability for CubeDataQueryService to recognize Cube API parser errors and pass them through successfully as errors to the GraphQL query. This is to support further frontend changes !116020 (merged)

How to set up and validate locally

  1. Setup your local GDK with the product analytics devkit
  2. run ::ProductAnalytics::CubeDataQueryService.new(container: Project.find(2), current_user: User.first, params: { query: 'invalid query', path: 'load' }).execute in a rails console
  3. The response should be "SyntaxError: Unexpected token i in JSON at position 0" with a reason :bad_request

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Related to #403038 (closed)

Edited by Drew Blessing

Merge request reports