This repository was archived by the owner on Mar 8, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy patherrors.js
More file actions
38 lines (33 loc) · 1.28 KB
/
errors.js
File metadata and controls
38 lines (33 loc) · 1.28 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
'use strict';
var TypedError = require('error/typed');
var MissingOptions = TypedError({
type: 'typed-request-client.missing-options',
message: 'Expected options to be defined.\n' +
'When calling `TypedRequestClient(...)` you need to ' +
'pass an options object.\n' +
'SUGGESTED FIX: Update the `TypedRequestClient()` ' +
'callsite and add an options argument.\n'
});
var MissingClientName = TypedError({
type: 'typed-request-client.missing-clientName',
message: 'Expected `options.clientName` to be defined.\n' +
'Expected to see a `clientName` property but instead ' +
'found {optionsStr}.\n' +
'SUGGESTED FIX: Update the `TypedRequestClient({})` ' +
'callsite and add `options.clientName`.\n',
optionsStr: null
});
var MissingStatsd = TypedError({
type: 'typed-request-client.missing-statsd',
message: 'Expected `options.statsd` to be defined.\n' +
'Expected to see a `statsd` property but instead ' +
'found {optionsStr}.\n' +
'SUGGESTED FIX: Update the `TypedRequestClient({})` ' +
'callsite and add `options.statsd`.\n',
optionsStr: null
});
module.exports = {
MissingOptions: MissingOptions,
MissingClientName: MissingClientName,
MissingStatsd: MissingStatsd
};