Merge pull request #1142 from useautumn/patch/feat/get-entity-failopen
This commit is contained in:
@@ -13,7 +13,7 @@ from .types import (
|
||||
SDKInitHook,
|
||||
)
|
||||
|
||||
FAIL_OPEN_OPERATION_IDS = {"check", "track", "listPlans"}
|
||||
FAIL_OPEN_OPERATION_IDS = {"check", "track", "listPlans", "getEntity"}
|
||||
|
||||
FAIL_OPEN_LOG_MESSAGE = (
|
||||
"[Autumn] Request failed \u2014 failing open. "
|
||||
@@ -35,6 +35,18 @@ FAIL_OPEN_BODIES: dict = {
|
||||
"listPlans": {
|
||||
"list": [],
|
||||
},
|
||||
"getEntity": {
|
||||
"id": None,
|
||||
"name": None,
|
||||
"customer_id": None,
|
||||
"feature_id": None,
|
||||
"created_at": 0,
|
||||
"env": "live",
|
||||
"subscriptions": [],
|
||||
"purchases": [],
|
||||
"balances": {},
|
||||
"flags": {},
|
||||
},
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -11,6 +11,7 @@ const FAIL_OPEN_OPERATION_IDS = new Set([
|
||||
"check",
|
||||
"track",
|
||||
"getOrCreateCustomer",
|
||||
"getEntity",
|
||||
]);
|
||||
|
||||
const FAIL_OPEN_LOG_MESSAGE =
|
||||
@@ -44,6 +45,18 @@ const FAIL_OPEN_BODIES: Record<string, object> = {
|
||||
balances: {},
|
||||
flags: {},
|
||||
},
|
||||
getEntity: {
|
||||
id: null,
|
||||
name: null,
|
||||
customer_id: null,
|
||||
feature_id: null,
|
||||
created_at: 0,
|
||||
env: "live",
|
||||
subscriptions: [],
|
||||
purchases: [],
|
||||
balances: {},
|
||||
flags: {},
|
||||
},
|
||||
};
|
||||
|
||||
export class FailOpenHook implements SDKInitHook, AfterErrorHook {
|
||||
|
||||
Reference in New Issue
Block a user