http
http copied to clipboard
Type of onError hook's argument is not correct
ky.HTTPError doesn't have statusCode.
https://github.com/nuxt/http/blob/86bf51e69a829efec5268593de998ecbc7d43c47/types/index.d.ts#L160
The correct type of this is ky.HTTPError & { statusCode?: number }.
Please check the code and document below.
Source code: https://github.com/nuxt/http/blob/86bf51e69a829efec5268593de998ecbc7d43c47/lib/plugin.js#L100 Document: https://github.com/nuxt/http/blob/658b8822e5c24ecf5eb6207a25cf150b1f88bcc5/docs/content/en/5.advanced.md#L41