Align e2e-prod suite with the monolith API; drop dead applyOverride; treat run_not_active as terminal
This commit is contained in:
@@ -40,7 +40,9 @@ function isTransientHttpError(err: unknown): boolean {
|
||||
function isDroppedRunError(err: unknown): boolean {
|
||||
if (!(err instanceof RudderHttpError)) return false;
|
||||
return (
|
||||
err.code === RudderErrorCodes.unknownRun || err.code === RudderErrorCodes.runExpired
|
||||
err.code === RudderErrorCodes.unknownRun ||
|
||||
err.code === RudderErrorCodes.runExpired ||
|
||||
err.code === RudderErrorCodes.runNotActive
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
@@ -23,22 +23,6 @@ export class RemoteConfigState<
|
||||
if (!config || config.value == null) return defaultValue;
|
||||
return parseValue(config.value, config.valueType, defaultValue);
|
||||
}
|
||||
|
||||
/**
|
||||
* Applies a scenario remote_config_override patch to the current snapshot.
|
||||
*
|
||||
* @internal
|
||||
*/
|
||||
applyOverride(key: string, value: string, valueType = 'json'): void {
|
||||
const next = new Map(this.data ?? []);
|
||||
next.set(key, {
|
||||
key,
|
||||
value,
|
||||
valueType,
|
||||
active: true,
|
||||
} as RemoteConfig);
|
||||
this.set(next);
|
||||
}
|
||||
}
|
||||
|
||||
function parseValue<T>(
|
||||
|
||||
Reference in New Issue
Block a user