mirror of
https://github.com/denoland/deno.git
synced 2025-09-26 12:19:12 +00:00
refactor: reduce number of ErrorKind variants (#3662)
This commit is contained in:
parent
e83658138b
commit
c90036ab88
13 changed files with 61 additions and 224 deletions
|
@ -15,8 +15,8 @@ testPerm({ net: true }, async function fetchConnectionError(): Promise<void> {
|
|||
} catch (err_) {
|
||||
err = err_;
|
||||
}
|
||||
assertEquals(err.kind, Deno.ErrorKind.HttpOther);
|
||||
assertEquals(err.name, "HttpOther");
|
||||
assertEquals(err.kind, Deno.ErrorKind.Http);
|
||||
assertEquals(err.name, "Http");
|
||||
assertStrContains(err.message, "error trying to connect");
|
||||
});
|
||||
|
||||
|
@ -106,8 +106,8 @@ testPerm({ net: true }, async function fetchEmptyInvalid(): Promise<void> {
|
|||
} catch (err_) {
|
||||
err = err_;
|
||||
}
|
||||
assertEquals(err.kind, Deno.ErrorKind.RelativeUrlWithoutBase);
|
||||
assertEquals(err.name, "RelativeUrlWithoutBase");
|
||||
assertEquals(err.kind, Deno.ErrorKind.UrlParse);
|
||||
assertEquals(err.name, "UrlParse");
|
||||
});
|
||||
|
||||
testPerm({ net: true }, async function fetchMultipartFormDataSuccess(): Promise<
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue