feat: import of custom platforms & file extensions

This commit is contained in:
DecDuck
2025-09-06 18:29:04 +10:00
parent 7266d0485b
commit fcfc30e5df
36 changed files with 13182 additions and 271 deletions

View File

@ -4,7 +4,7 @@ import type {
NitroFetchRequest,
TypedInternalResponse,
} from "nitropack/types";
import type { FetchError } from "ofetch";
import { FetchError } from "ofetch";
interface DropFetch<
DefaultT = unknown,
@ -66,6 +66,9 @@ export const $dropFetch: DropFetch = async (rawRequest, opts) => {
(_, c) => c(),
);
}
if(e instanceof FetchError) {
e.message = e.data.message ?? e.message;
}
throw e;
}
}