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]] ServerError to be BC with node8 #17

Closed
wants to merge 1 commit into from
Closed

Conversation

jmendiara
Copy link
Member

V8 shipped with node8 break our test and reported a this.name inside
a ServerError instantiation, resulting in setting the name for a
NotFoundError to something like NotFound.Error

This can break logs in userland so this can be considered an inherited
breaking change

More info

  1) Therror when using ServerError should have precreated classes for statusCodes:

      AssertionError: expected { Object (error, message) } to deeply equal { Object (error, message) }
      + expected - actual

       {
      -  "error": "NotFound.Error"
      +  "error": "NotFound"
         "message": "The user Sarah does not exists"
       }

      at Context.<anonymous> (test/therror.spec.js:584:37)

  2) Therror when using ServerError should hide information to the client:

      AssertionError: expected 'ServiceUnavailable.Error' to deeply equal 'ServiceUnavailable'
      + expected - actual

      -ServiceUnavailable.Error
      +ServiceUnavailable

      at Context.<anonymous> (test/therror.spec.js:603:30)

  3) Therror when using ServerError should set string as message for ServerError:

      AssertionError: expected 'ServiceUnavailable.Error' to deeply equal 'ServiceUnavailable'
      + expected - actual

      -ServiceUnavailable.Error
      +ServiceUnavailable

      at Context.<anonymous> (test/therror.spec.js:616:30)

  4) Therror when using ServerError should set string as cause for ServerError:

      AssertionError: expected 'ServiceUnavailable.Error' to deeply equal 'ServiceUnavailable'
      + expected - actual

      -ServiceUnavailable.Error
      +ServiceUnavailable

      at Context.<anonymous> (test/therror.spec.js:629:30)

  5) Therror when using ServerError should set Number as message for ServerError:

      AssertionError: expected 'ServiceUnavailable.Error' to deeply equal 'ServiceUnavailable'
      + expected - actual

      -ServiceUnavailable.Error
      +ServiceUnavailable

      at Context.<anonymous> (test/therror.spec.js:643:30)

  6) Therror when using ServerError should set Number as cause for ServerError:

      AssertionError: expected 'ServiceUnavailable.Error' to deeply equal 'ServiceUnavailable'
      + expected - actual

      -ServiceUnavailable.Error
      +ServiceUnavailable

      at Context.<anonymous> (test/therror.spec.js:656:30)

V8 shipped with node8 break our test and reported a `this.name` inside
a ServerError instantiation, resulting in setting the name for a
NotFoundError to something like `NotFound.Error`

This can break logs in userland so this can be considered an inherited
breaking change

More info

```
  1) Therror when using ServerError should have precreated classes for statusCodes:

      AssertionError: expected { Object (error, message) } to deeply equal { Object (error, message) }
      + expected - actual

       {
      -  "error": "NotFound.Error"
      +  "error": "NotFound"
         "message": "The user Sarah does not exists"
       }

      at Context.<anonymous> (test/therror.spec.js:584:37)

  2) Therror when using ServerError should hide information to the client:

      AssertionError: expected 'ServiceUnavailable.Error' to deeply equal 'ServiceUnavailable'
      + expected - actual

      -ServiceUnavailable.Error
      +ServiceUnavailable

      at Context.<anonymous> (test/therror.spec.js:603:30)

  3) Therror when using ServerError should set string as message for ServerError:

      AssertionError: expected 'ServiceUnavailable.Error' to deeply equal 'ServiceUnavailable'
      + expected - actual

      -ServiceUnavailable.Error
      +ServiceUnavailable

      at Context.<anonymous> (test/therror.spec.js:616:30)

  4) Therror when using ServerError should set string as cause for ServerError:

      AssertionError: expected 'ServiceUnavailable.Error' to deeply equal 'ServiceUnavailable'
      + expected - actual

      -ServiceUnavailable.Error
      +ServiceUnavailable

      at Context.<anonymous> (test/therror.spec.js:629:30)

  5) Therror when using ServerError should set Number as message for ServerError:

      AssertionError: expected 'ServiceUnavailable.Error' to deeply equal 'ServiceUnavailable'
      + expected - actual

      -ServiceUnavailable.Error
      +ServiceUnavailable

      at Context.<anonymous> (test/therror.spec.js:643:30)

  6) Therror when using ServerError should set Number as cause for ServerError:

      AssertionError: expected 'ServiceUnavailable.Error' to deeply equal 'ServiceUnavailable'
      + expected - actual

      -ServiceUnavailable.Error
      +ServiceUnavailable

      at Context.<anonymous> (test/therror.spec.js:656:30)

```
@coveralls
Copy link

Coverage Status

Coverage decreased (-0.9%) to 95.652% when pulling 364be1e on fix/node8 into 5d4f733 on master.

@jmendiara jmendiara closed this Feb 26, 2018
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.

None yet

2 participants