Skip to content

Conversation

@RomainLanz
Copy link
Member

@RomainLanz RomainLanz commented Oct 23, 2019

Proposed changes

It seems that the correct type for the error variable created inside a stream callback is NodeJS.ErrnoException.

Therefor, this type doesn't have any status property, this means we cannot use it to send back the status.

Types of changes

I have corrected the type in the callback and added a test to ensure no regression and that the change fixed an actual bug (before, the status was always 500).

  • Bugfix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)

Checklist

  • I have read the CONTRIBUTING doc
  • Lint and unit tests pass locally with my changes
  • I have added tests that prove my fix is effective or that my feature works.
  • I have added necessary documentation (if appropriate)

@thetutlage thetutlage merged commit 75a9f68 into adonisjs:develop Oct 23, 2019
@thetutlage
Copy link
Member

Beautiful :)

@RomainLanz RomainLanz deleted the fixing-types branch October 23, 2019 17:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants