Recognize unknown Cube API errors and pass them through to the UI
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
- Setup your local GDK with the product analytics devkit
- run
::ProductAnalytics::CubeDataQueryService.new(container: Project.find(2), current_user: User.first, params: { query: 'invalid query', path: 'load' }).execute
in a rails console - 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.
-
I have evaluated the MR acceptance checklist for this MR.
Related to #403038 (closed)
Edited by Drew Blessing