Skip to content
This repository was archived by the owner on Feb 2, 2024. It is now read-only.
This repository was archived by the owner on Feb 2, 2024. It is now read-only.

When using onResponse the remote http statusCode is not being passed to fn and therefore all status are 200 #30

@yohay-ma

Description

@yohay-ma

🐛 Bug Report

When using onResponse the remote http statusCode is not being used and therefore all status are 200

To Reproduce

in opts.test.js extend the service and add an additional route that returns different status code then 200.
add a test that calls this route and expect to get the different status

line 113 in index.js

onResponse(req, res, stream)

Expected behavior

the onResponse should get the response object

onResponse(req, res, stream, response)

Your Environment

  • node version: 12
  • fastify version: latest
  • os: Mac

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions