Skip to content

v1.0.0-next.21

Pre-release
Pre-release
Compare
Choose a tag to compare
@lukeed lukeed released this 01 Oct 13:24

Breaking

  • (polka) Remove code property support for next() errors: f95a5b4
    Previously any errors or custom error-objects could use the code property to set the response status code. However, this could pose a problem with native Error types that set an error code (eg, "ENOENT") which is an invalid status code.

    Now you must use the status property, which was always supported, but took a backseat to code's existence. Express also supports the status property.
    next({
    -- code: 422,
    ++ status: 422,
       message: 'Invalid content',
    });

Chores

  • (@polka/url) Accomodate an updated error message in test expectant: d30d448