message: Tweak GraphQL error reporting
diff: -import HTTPClient from './HTTPClient';
  +import HTTPClient, { HTTPClientError } from './HTTPClient';
  export default class GraphQLClient {
  constructor({ uri, ...httpClientOptions }) {
  @@ -12,16 +12,7 @@ export default class GraphQLClient {
  this.headers.Authorization = `Bearer ${token}`;
  }
  - async runQuery(query, variables, headers) {
  - const response = await this.client.fetch(this.uri, {
  - body: JSON.stringify({ query, variables }),
  - headers: { ...this.headers, ...headers },
  - method: 'post',
  - });
  -
  - const { data, errors } = await response.json();
  -
  - if (errors) {
  + throwErrors(errors) {
  if (Array.isArray(errors)) {
  errors.forEach((err) => {
  // eslint-disable-next-line no-param-reassign
  @@ -36,7 +27,29 @@ export default class GraphQLClient {
  throw errors;
  }
  - return data;
  + async runQuery(query, variables, headers) {
  + try {
  + const response = await this.client.fetch(
  + this.uri,
  + {
  + body: JSON.stringify({ query, variables }),
  + headers: { ...this.headers, ...headers },
  + method: 'post',
  + },
  + { noLogErrorBody: true }
  + );
  +
  + const { data, errors } = await response.json();
  + return errors ? this.throwErrors(errors) : data;
  + } catch (err) {
  + if (!(err instanceof HTTPClientError)) throw err;
  + try {
  + const { errors } = await err.response.json();
  + return this.throwErrors(errors);
  + } catch (e) {
  + throw err;
  + }
  + }
  }
  // Convenience static method.
  