Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

typescript-node: Use HttpError class when rejecting promises #3876

Merged
merged 3 commits into from Sep 12, 2019
Merged

typescript-node: Use HttpError class when rejecting promises #3876

merged 3 commits into from Sep 12, 2019

Conversation

ghost
Copy link

@ghost ghost commented Sep 11, 2019

PR checklist

  • Read the contribution guidelines.
  • Ran the shell script under ./bin/ to update Petstore sample so that CIs can verify the change. (For instance, only need to run ./bin/{LANG}-petstore.sh, ./bin/openapi3/{LANG}-petstore.sh if updating the {LANG} (e.g. php, ruby, python, etc) code generator or {LANG} client's mustache templates). Windows batch files can be found in .\bin\windows\. If contributing template-only or documentation-only changes which will change sample output, be sure to build the project first.
  • Filed the PR against the correct branch: master, 4.1.x, 5.0.x. Default: master.
  • Copied the technical committee to review the pull request if your PR is targeting a particular programming language.

Description of the PR

Use a HttpError class instead of plain objects when rejecting promises.
Fixes #3872

@TiFu (2017/07) @taxpon (2017/07) @sebastianhaas (2017/07) @kenisteward (2017/07) @Vrolijkx (2017/09) @macjohnny (2018/01) @nicokoenig (2018/09) @topce (2018/10) @akehir (2019/07)

@auto-labeler auto-labeler bot added the WIP Work in Progress label Sep 11, 2019
@auto-labeler
Copy link

auto-labeler bot commented Sep 11, 2019

👍 Thanks for opening this issue!
🏷 I have applied any labels matching special text in your issue.

The team will review the labels and make any necessary changes.

@ghost ghost changed the title WIP: Use HttpError class when rejecting promises Use HttpError class when rejecting promises Sep 12, 2019
@macjohnny
Copy link
Member

macjohnny commented Sep 12, 2019

@macjohnny macjohnny added Client: TypeScript and removed WIP Work in Progress labels Sep 12, 2019
@macjohnny macjohnny changed the title Use HttpError class when rejecting promises typescript-node: Use HttpError class when rejecting promises Sep 12, 2019
@macjohnny macjohnny added this to the 4.1.3 milestone Sep 12, 2019
@macjohnny
Copy link
Member

@aeb-sia did you successfully test the generated code? does it fix the issue?

Copy link
Member

@macjohnny macjohnny left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@ghost
Copy link
Author

ghost commented Sep 12, 2019

@macjohnny here's what I tested. Is it ok to push that?

Copy link
Member

@macjohnny macjohnny left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@macjohnny macjohnny merged commit dc2907a into OpenAPITools:master Sep 12, 2019
@ghost ghost deleted the reject-using-error-instances branch September 12, 2019 14:03
jimschubert added a commit that referenced this pull request Sep 13, 2019
* master: (22 commits)
  various minor improvements to nim generator (#3883)
  Add Nim client code generator (#3879)
  updated google-api-client version from 1.23.0 to 1.30.2.  Bugfix #3625 (#3882)
  typescript-fetch: fix missing comma in multiple imports (#3881)
  [scala][client] add Scala code generation test (#3859)
  typescript-node: Use HttpError class when rejecting promises (#3876)
  update stable release
  update doc, samples (#3875)
  BugFix #2053 Spring Boot fails to parse LocalDate query parameter (#3860)
  fix version in readme
  Prepare v4.1.2 release (#3873)
  Rename gRPC generator to "protobuf-schema" (#3864)
  typescript-axios: Fix baseoptions (#3866)
  Fix/r/serialization fix and minor 3xx resp fix (#3817)
  [typescript-angular] allow empty string basePath (#3489)
  typescript-inversify: improve check for required parameters, support multiple media types (#3849)
  [C++][Pistache] Add missing setter for arrays (#3837)
  Adds Http Info To Dart Api (#3851)
  [Java][okhttp-gson] fix failure to deserialize floats (#3846)
  maven-plugin-plugin 3.6.0 (#3854)
  ...
@wing328
Copy link
Member

wing328 commented Oct 4, 2019

@aeb-sia thanks for the PR, which has been included in the v4.1.3 release: https://twitter.com/oas_generator/status/1180123829626003456

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

typescript-node: Reject Promises in using Error instances instead of plain objects
3 participants