// Copyright 2017 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
module blink.mojom;
// Error codes for service worker APIs. This enum is used by
// blink::WebServiceWorkerError, and the related class blink::ServiceWorkerError
// converts blink::WebServiceWorkerError to runtime exceptions.
enum ServiceWorkerErrorType {
kNone = 0,
kAbort,
kActivate,
kDisabled,
kInstall,
kNavigation,
kNetwork,
kNotFound,
kScriptEvaluateFailed,
kSecurity,
kState,
kTimeout,
kType,
kUnknown,
};
// Detailed error types for respondWith with FetchEvent and PaymentRequestEvent
// in ServiceWorker.
enum ServiceWorkerResponseError {
kUnknown,
kPromiseRejected,
kDefaultPrevented,
kNoV8Instance,
kResponseTypeError,
kResponseTypeOpaque,
kResponseTypeNotBasicOrDefault,
kBodyUsed,
kResponseTypeOpaqueForClientRequest,
kResponseTypeOpaqueRedirect,
kBodyLocked,
kRedirectedResponseForNotFollowRequest,
kDataPipeCreationFailed,
kResponseTypeCorsForRequestModeSameOrigin,
kResponseBodyBroken,
kDisallowedByCorp,
kRequestBodyUnusable,
};