v1.0.0-next.21
Pre-release
Pre-release
Breaking
- (
polka
) Removecode
property support fornext()
errors: f95a5b4
Previously any errors or custom error-objects could use thecode
property to set the response status code. However, this could pose a problem with nativeError
types that set an error code (eg,"ENOENT"
) which is an invalid status code.
Now you must use thestatus
property, which was always supported, but took a backseat tocode
's existence. Express also supports thestatus
property.next({ -- code: 422, ++ status: 422, message: 'Invalid content', });
Chores
- (
@polka/url
) Accomodate an updated error message in test expectant: d30d448