No Description
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

errors.d.ts 1.9KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. /**
  2. * @license
  3. * Copyright 2020 Google LLC
  4. *
  5. * Licensed under the Apache License, Version 2.0 (the "License");
  6. * you may not use this file except in compliance with the License.
  7. * You may obtain a copy of the License at
  8. *
  9. * http://www.apache.org/licenses/LICENSE-2.0
  10. *
  11. * Unless required by applicable law or agreed to in writing, software
  12. * distributed under the License is distributed on an "AS IS" BASIS,
  13. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  14. * See the License for the specific language governing permissions and
  15. * limitations under the License.
  16. */
  17. import { ErrorFactory } from '@firebase/util';
  18. export declare const enum AppCheckError {
  19. ALREADY_INITIALIZED = "already-initialized",
  20. USE_BEFORE_ACTIVATION = "use-before-activation",
  21. FETCH_NETWORK_ERROR = "fetch-network-error",
  22. FETCH_PARSE_ERROR = "fetch-parse-error",
  23. FETCH_STATUS_ERROR = "fetch-status-error",
  24. STORAGE_OPEN = "storage-open",
  25. STORAGE_GET = "storage-get",
  26. STORAGE_WRITE = "storage-set",
  27. RECAPTCHA_ERROR = "recaptcha-error",
  28. THROTTLED = "throttled"
  29. }
  30. interface ErrorParams {
  31. [AppCheckError.ALREADY_INITIALIZED]: {
  32. appName: string;
  33. };
  34. [AppCheckError.USE_BEFORE_ACTIVATION]: {
  35. appName: string;
  36. };
  37. [AppCheckError.FETCH_NETWORK_ERROR]: {
  38. originalErrorMessage: string;
  39. };
  40. [AppCheckError.FETCH_PARSE_ERROR]: {
  41. originalErrorMessage: string;
  42. };
  43. [AppCheckError.FETCH_STATUS_ERROR]: {
  44. httpStatus: number;
  45. };
  46. [AppCheckError.STORAGE_OPEN]: {
  47. originalErrorMessage?: string;
  48. };
  49. [AppCheckError.STORAGE_GET]: {
  50. originalErrorMessage?: string;
  51. };
  52. [AppCheckError.STORAGE_WRITE]: {
  53. originalErrorMessage?: string;
  54. };
  55. [AppCheckError.THROTTLED]: {
  56. time: string;
  57. httpStatus: number;
  58. };
  59. }
  60. export declare const ERROR_FACTORY: ErrorFactory<AppCheckError, ErrorParams>;
  61. export {};