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

Fix: Identifier not used in Abort init #1923

Merged
merged 1 commit into from Mar 5, 2019

Conversation

mikkelu
Copy link
Sponsor

@mikkelu mikkelu commented Mar 2, 2019

After spending some time wondering why my errors being thrown with a custom AbortError did not have the correct identifier, I found that the Abort initializer never uses the identifier parameter.

This is a simple fix that lets the initializer use the identifier parameter, falling back to status.code.description if there is no id specified.

Checklist

  • Circle CI is passing (code compiles and passes tests).
  • There are no breaking changes to public API.
  • New test cases have been added where appropriate.
  • All new code has been commented with doc blocks ///.

@MrLotU MrLotU requested a review from tanner0101 March 2, 2019 14:15
Copy link
Sponsor Member

@MrLotU MrLotU left a comment

Choose a reason for hiding this comment

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

LGTM

@MrLotU MrLotU added the bug Something isn't working label Mar 2, 2019
@tanner0101 tanner0101 added this to In Progress in Vapor 3 via automation Mar 5, 2019
Copy link
Member

@tanner0101 tanner0101 left a comment

Choose a reason for hiding this comment

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

Thanks!

@tanner0101 tanner0101 merged commit bf496ff into vapor:3 Mar 5, 2019
@penny-coin
Copy link

Hey @mikkelu, you just merged a pull request, have a coin!

You now have 4 coins.

@mikkelu mikkelu deleted the fix/missing-identifier-abort branch March 6, 2019 07:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
No open projects
Vapor 3
  
In Progress
Development

Successfully merging this pull request may close these issues.

None yet

4 participants