/
cancellation_error_code.go
45 lines (31 loc) · 1.55 KB
/
cancellation_error_code.go
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
// Copyright (c) Microsoft. All rights reserved.
// Licensed under the MIT license. See LICENSE.md file in the project root for full license information.
package common
// CancellationErrorCode defines error code in case that CancellationReason is Error.
type CancellationErrorCode int
const (
// No error.
// If CancellationReason is EndOfStream, CancellationErrorCode
// is set to NoError.
NoError CancellationErrorCode = 0
// Indicates an authentication error.
// An authentication error occurs if subscription key or authorization token is invalid, expired,
// or does not match the region being used.
AuthenticationFailure CancellationErrorCode = 1
// Indicates that one or more recognition parameters are invalid or the audio format is not supported.
BadRequest CancellationErrorCode = 2
// Indicates that the number of parallel requests exceeded the number of allowed concurrent transcriptions for the subscription.
TooManyRequests CancellationErrorCode = 3
// Indicates that the free subscription used by the request ran out of quota.
Forbidden CancellationErrorCode = 4
// Indicates a connection error.
ConnectionFailure CancellationErrorCode = 5
// Indicates a time-out error when waiting for response from service.
ServiceTimeout CancellationErrorCode = 6
// Indicates that an error is returned by the service.
ServiceError CancellationErrorCode = 7
// Indicates that the service is currently unavailable.
ServiceUnavailable CancellationErrorCode = 8
// Indicates an unexpected runtime error.
RuntimeError CancellationErrorCode = 9
)