<commit_before>
{{{operationComments}}}
  {{operationName}}({{#operationParamsClass
  }}params: {{serviceClass}}.{{operationParamsClass}}{{/operationParamsClass}}{{^operationParamsClass
  }}{{#operationParameters}}{{paramVar}}{{^paramRequired}}?{{/paramRequired}}: {{paramType
  }}{{^paramIsLast}},
    {{/paramIsLast}}{{/operationParameters}}{{/operationParamsClass
    }}): Promise<_ApiResponse_<{{operationResultType}}>> {
    let options = new RequestOptions({
      method: "{{operationMethod}}",
      url: ApiConfiguration.rootUrl + `{{{operationPathExpression}}}`,
      search: new URLSearchParams(),
      headers: new Headers()
    });
{{#operationParameters}}{{>parameter}}
{{/operationParameters}}
    ApiConfiguration.prepareRequestOptions(options);
    return this.http.request(options.url, options)
      .toPromise()
      .then(response => {
        if (response.status < 200 || response.status > 299) {
          throw response;
        }
        return new _ApiResponse_(response, {{#operationIsVoid}}null{{/operationIsVoid
        }}{{#operationIsString}}response.text(){{/operationIsString
        }}{{#operationIsNumber}}parseFloat(response.text()){{/operationIsNumber
        }}{{#operationIsBoolean}}response.text() == 'true'{{/operationIsBoolean
        }}{{#operationIsEnum}}response.text() as {{operationResultType}}{{/operationIsEnum
        }}{{#operationIsObject}}response.json() as {{operationResultType}}{{/operationIsObject
        }}{{#operationIsPrimitiveArray}}response.json() as {{operationResultType}}{{/operationIsPrimitiveArray
        }}{{#operationIsUnknown}}null{{/operationIsUnknown}});
      }){{#generalErrorHandler}}
      .catch(ApiConfiguration.handleError){{/generalErrorHandler}};<commit_msg>Rethrow exceptions on promises.<commit_after>
{{{operationComments}}}
  {{operationName}}({{#operationParamsClass
  }}params: {{serviceClass}}.{{operationParamsClass}}{{/operationParamsClass}}{{^operationParamsClass
  }}{{#operationParameters}}{{paramVar}}{{^paramRequired}}?{{/paramRequired}}: {{paramType
  }}{{^paramIsLast}},
    {{/paramIsLast}}{{/operationParameters}}{{/operationParamsClass
    }}): Promise<_ApiResponse_<{{operationResultType}}>> {
    let options = new RequestOptions({
      method: "{{operationMethod}}",
      url: ApiConfiguration.rootUrl + `{{{operationPathExpression}}}`,
      search: new URLSearchParams(),
      headers: new Headers()
    });
{{#operationParameters}}{{>parameter}}
{{/operationParameters}}
    ApiConfiguration.prepareRequestOptions(options);
    return this.http.request(options.url, options)
      .toPromise()
      .then(response => {
        if (response.status < 200 || response.status > 299) {
          throw response;
        }
        return new _ApiResponse_(response, {{#operationIsVoid}}null{{/operationIsVoid
        }}{{#operationIsString}}response.text(){{/operationIsString
        }}{{#operationIsNumber}}parseFloat(response.text()){{/operationIsNumber
        }}{{#operationIsBoolean}}response.text() == 'true'{{/operationIsBoolean
        }}{{#operationIsEnum}}response.text() as {{operationResultType}}{{/operationIsEnum
        }}{{#operationIsObject}}response.json() as {{operationResultType}}{{/operationIsObject
        }}{{#operationIsPrimitiveArray}}response.json() as {{operationResultType}}{{/operationIsPrimitiveArray
        }}{{#operationIsUnknown}}null{{/operationIsUnknown}});
      }){{#generalErrorHandler}}
      .catch(e => {
        ApiConfiguration.handleError(e);
        throw e;
      }){{/generalErrorHandler}};
{'fraction_non_alphanumeric': 0.1771830985915493, 'fraction_numerical': 0.0033802816901408453, 'mean_word_length': 5.090909090909091, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 14, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4094913', 'n_tokens_mistral': 982, 'n_tokens_neox': 954, 'n_words': 126}