docs: private String extractErrorMessageFromResponse(HttpResponse response) {
          String contentType = response.getEntity().getContentType().getValue();
          if(contentType.contains("application/json")) {
              Gson gson = GsonResponseParser.getDefaultGsonParser(false);
              String responseBody = null;
              try {
                  responseBody = EntityUtils.toString(response.getEntity());
                  LOG.error("Body of error response from Canvas: " + responseBody);
                  CanvasErrorResponse errorResponse = gson.fromJson(responseBody, CanvasErrorResponse.class);
                  List<ErrorMessage> errors = errorResponse.getErrors();
                  if(errors != null) {
                      //I have only ever seen a single error message but it is an array so presumably there could be more.
                      return errors.stream().map(e -> e.getMessage()).collect(Collectors.joining(", "));
                  }
                  else{
                      return responseBody;
                  }
              } catch (Exception e) {
                  //Returned JSON was not in expected format. Fall back to returning the whole response body, if any
                  if(StringUtils.isNotBlank(responseBody)) {
                      return responseBody;
                  }
              }
          }
          return null;
      }