@@ -58,7 +58,7 @@ export class MoeraNodeConnectionError extends Error {
58
58
/**
59
59
* Missing context of the call (authentication parameters or node URL).
60
60
*/
61
- export class MoeraCallError extends Error {
61
+ export class MoeraNodeCallError extends Error {
62
62
63
63
/**
64
64
* @param {string } message - error message
@@ -211,7 +211,7 @@ interface CallOptions {
211
211
*/
212
212
auth ?: boolean ;
213
213
/**
214
- * JSON schema to validate the response
214
+ * JSON schema name to validate the response, or ``"blob"`` if the result is ``Buffer``
215
215
*/
216
216
schema : string ;
217
217
/**
@@ -368,18 +368,18 @@ export class Caller {
368
368
} else if ( this . _carte != null ) {
369
369
bearer = "carte:" + this . _carte ;
370
370
} else {
371
- throw new MoeraCallError ( "Carte is not set" ) ;
371
+ throw new MoeraNodeCallError ( "Carte is not set" ) ;
372
372
}
373
373
break ;
374
374
case "admin" :
375
375
if ( this . _token == null ) {
376
- throw new MoeraCallError ( "Token is not set" ) ;
376
+ throw new MoeraNodeCallError ( "Token is not set" ) ;
377
377
}
378
378
bearer = "token:" + this . _token ;
379
379
break ;
380
380
case "root-admin" :
381
381
if ( this . _rootSecret == null ) {
382
- throw new MoeraCallError ( "Root secret is not set" ) ;
382
+ throw new MoeraNodeCallError ( "Root secret is not set" ) ;
383
383
}
384
384
bearer = "secret:" + this . _rootSecret ;
385
385
break ;
@@ -390,7 +390,7 @@ export class Caller {
390
390
}
391
391
392
392
if ( this . root == null ) {
393
- throw new MoeraCallError ( "Node URL is not set" ) ;
393
+ throw new MoeraNodeCallError ( "Node URL is not set" ) ;
394
394
}
395
395
396
396
let url = urlWithParameters ( this . root + "/api" + location , params ) ;
0 commit comments