OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 /** | 5 /** |
6 * @fileoverview Error codes reported by top-level request handlers. | 6 * @fileoverview Errors reported by top-level request handlers. |
7 */ | 7 */ |
8 'use strict'; | 8 'use strict'; |
9 | 9 |
10 /** | 10 /** |
11 * Response status codes | 11 * Response status codes |
12 * @const | 12 * @const |
13 * @enum {number} | 13 * @enum {number} |
14 */ | 14 */ |
15 var ErrorCodes = { | 15 var ErrorCodes = { |
16 'OK': 0, | 16 'OK': 0, |
17 'OTHER_ERROR': 1, | 17 'OTHER_ERROR': 1, |
18 'BAD_REQUEST': 2, | 18 'BAD_REQUEST': 2, |
19 'CONFIGURATION_UNSUPPORTED': 3, | 19 'CONFIGURATION_UNSUPPORTED': 3, |
20 'DEVICE_INELIGIBLE': 4, | 20 'DEVICE_INELIGIBLE': 4, |
21 'TIMEOUT': 5 | 21 'TIMEOUT': 5 |
22 }; | 22 }; |
| 23 |
| 24 /** |
| 25 * An error object for responses |
| 26 * @typedef {{ |
| 27 * errorCode: ErrorCodes, |
| 28 * errorMessage: (?string|undefined) |
| 29 * }} |
| 30 */ |
| 31 var U2fError; |
OLD | NEW |