[BUG][typescript-fetch] New FetchError class incorrectly extends base class Error
Created by: sevein
Bug Report Checklist
-
Have you provided a full/minimal spec to reproduce the issue? -
Have you validated the input using an OpenAPI validator (example)? -
Have you tested with the latest master to confirm the issue still exists? -
Have you searched for related issues/PRs? -
What's the actual output vs expected output?
Description
https://github.com/OpenAPITools/openapi-generator/commit/3a2bbbb8501f7238dba0dc124234e9e0459cdd9e introduced a new class (FetchError) that produces a build issue in TypeScript when using the strict mode:
src/openapi-generator/runtime.ts:239:14 - error TS2415: Class 'FetchError' incorrectly extends base class 'Error'.
Types of property 'cause' are incompatible.
Type 'unknown' is not assignable to type 'Error | undefined'.
239 export class FetchError extends Error {
~~~~~~~~~~
Example of FetchError:
openapi-generator version
v6.0.1 (and master)
OpenAPI declaration file content or url
N/A
Generation Details
N/A
Steps to reproduce
N/A
Related issues/PRs
FetchError was introduced in the context of this issue: https://github.com/OpenAPITools/openapi-generator/pull/12716.
Suggest a fix
N/A