-
Notifications
You must be signed in to change notification settings - Fork 37
Expand file tree
/
Copy patherrorHelper.ts
More file actions
53 lines (48 loc) · 1.39 KB
/
errorHelper.ts
File metadata and controls
53 lines (48 loc) · 1.39 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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
import { AgentErrorDefinition } from '@microsoft/agents-activity'
/**
* Error definitions for the Blob Storage system.
* This contains localized error codes for the Blob Storage subsystem of the AgentSDK.
*
* Each error definition includes an error code (starting from -160000), a description, and a help link
* pointing to an AKA link to get help for the given error.
*
* Usage example:
* ```
* throw ExceptionHelper.generateException(
* Error,
* Errors.InvalidTimestamp
* );
* ```
*/
export const Errors: { [key: string]: AgentErrorDefinition } = {
/**
* Error thrown when timestamp is not a valid Date instance.
*/
InvalidTimestamp: {
code: -160000,
description: 'Invalid timestamp: must be an instance of Date'
},
/**
* Error thrown when an empty key is provided.
*/
EmptyKeyProvided: {
code: -160001,
description: 'Please provide a non-empty key'
},
/**
* Error thrown when there is an eTag conflict during a storage operation.
*/
ETagConflict: {
code: -160002,
description: 'Unable to write \'{key}\' due to eTag conflict.'
},
/**
* Error thrown when attempting to create an item that already exists in storage.
*/
ItemAlreadyExists: {
code: -160003,
description: 'Unable to write \'{key}\' because it already exists.'
}
}