Skip to content

@cubejs-client/core load method error does not contain HTTP error code #833

Open
@ryanleong

Description

@ryanleong

Describe the bug
In @cubejs-client/core, when an errors occurs, there is no way to get errors the HTTP error code.

To Reproduce

  1. Make a request using @cubejs-client/core like this
const makeQuery = async () => {
  const cubejsApi = cubejs(
    'CUBEJS-API-TOKEN',
    { apiUrl: 'http://localhost:4000/cubejs-api/v1' }
  );

  try {
    const response = await cubejsApi.load(query);
    return response.chartPivot();
  } catch (error) {
    console.log(error);
  }
}
  1. error in the catch block does not contain http error code

Expected behavior
error should contain the HTTP error code

Version:
^0.15.4

Additional context

Metadata

Metadata

Assignees

No one assigned

    Labels

    client:coreIssues relating to the JavaScript client SDKenhancementNew feature proposalhelp wantedCommunity contributions are welcome.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions