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 #18

Merged
merged 1 commit into from
Feb 26, 2018
Merged

[[FIX]] ServerError to be BC with node8 #18

merged 1 commit into from
Feb 26, 2018

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

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)

Closes #16

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`

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)

```

Closes #16
@coveralls
Copy link

Coverage Status

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

1 similar comment
@coveralls
Copy link

coveralls commented Feb 26, 2018

Coverage Status

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

@jmendiara jmendiara merged commit ff907c9 into master Feb 26, 2018
@jmendiara jmendiara deleted the fix/node8 branch February 26, 2018 17:48
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