File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -2,7 +2,7 @@ export type { Config } from "./src/config.ts";
22export { config } from "./src/config.ts" ;
33
44export {
5- InvalidArgumentTypesError ,
5+ InvalidArgumentError ,
66 InvalidTimeoutError ,
77 MissingApiKeyError ,
88} from "./src/errors.ts" ;
Original file line number Diff line number Diff line change 1- export class InvalidArgumentTypesError extends Error {
1+ export class InvalidArgumentError extends Error {
22 constructor ( ) {
3- super ( "Provide the arguments with the correct type" ) ;
4- Object . setPrototypeOf ( this , InvalidArgumentTypesError . prototype ) ;
3+ super ( "Arguments are missing or of incorrect type" ) ;
4+ Object . setPrototypeOf ( this , InvalidArgumentError . prototype ) ;
55 }
66}
77
Original file line number Diff line number Diff line change 11import { EngineMap } from "./engines/engine_map.ts" ;
2- import { InvalidArgumentTypesError } from "./errors.ts" ;
2+ import { InvalidArgumentError } from "./errors.ts" ;
33import {
44 AccountApiParameters ,
55 AccountInformation ,
@@ -97,7 +97,7 @@ export function getJson<
9797 const [ parameters , callback ] = args ;
9898 return _getJson ( parameters , callback ) ;
9999 } else {
100- throw new InvalidArgumentTypesError ( ) ;
100+ throw new InvalidArgumentError ( ) ;
101101 }
102102}
103103
@@ -181,7 +181,7 @@ export function getHtml<
181181 const [ parameters , callback ] = args ;
182182 return _getHtml ( parameters , callback ) ;
183183 } else {
184- throw new InvalidArgumentTypesError ( ) ;
184+ throw new InvalidArgumentError ( ) ;
185185 }
186186}
187187
Original file line number Diff line number Diff line change @@ -21,7 +21,7 @@ import {
2121 getHtml ,
2222 getJson ,
2323 getLocations ,
24- InvalidArgumentTypesError ,
24+ InvalidArgumentError ,
2525 InvalidTimeoutError ,
2626 MissingApiKeyError ,
2727} from "../mod.ts" ;
@@ -238,12 +238,12 @@ describe("getJson", {
238238 assertRejects (
239239 // @ts -ignore testing invalid usage
240240 async ( ) => await getJson ( "google" ) ,
241- InvalidArgumentTypesError ,
241+ InvalidArgumentError ,
242242 ) ;
243243 assertRejects (
244244 // @ts -ignore testing invalid usage
245245 async ( ) => await getJson ( ) ,
246- InvalidArgumentTypesError ,
246+ InvalidArgumentError ,
247247 ) ;
248248 } ) ;
249249
@@ -367,12 +367,12 @@ describe("getHtml", {
367367 assertRejects (
368368 // @ts -ignore testing invalid usage
369369 async ( ) => await getHtml ( "google" ) ,
370- InvalidArgumentTypesError ,
370+ InvalidArgumentError ,
371371 ) ;
372372 assertRejects (
373373 // @ts -ignore testing invalid usage
374374 async ( ) => await getHtml ( ) ,
375- InvalidArgumentTypesError ,
375+ InvalidArgumentError ,
376376 ) ;
377377 } ) ;
378378
You can’t perform that action at this time.
0 commit comments