http-request-manager 18.15.7 → 18.15.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -1933,8 +1933,8 @@ class WebSocketManagerService {
|
|
|
1933
1933
|
WebSocketManagerService.socket.onmessage = (event) => {
|
|
1934
1934
|
try {
|
|
1935
1935
|
const data = JSON.parse(event.data);
|
|
1936
|
-
if (data.error && data.error === 'JWT_INVALID') {
|
|
1937
|
-
console.error(
|
|
1936
|
+
if (data.error && (data.error === 'JWT_INVALID' || data.error === 'AUTH_BLOCKED')) {
|
|
1937
|
+
console.error(`🚫 ${data.error}: ${data.message || 'Authentication error'}`);
|
|
1938
1938
|
WebSocketManagerService.jwtInvalidClose = true;
|
|
1939
1939
|
WebSocketManagerService.messages.next(data);
|
|
1940
1940
|
WebSocketManagerService.connectionStatus.next(false);
|
|
@@ -6241,27 +6241,27 @@ class DatabaseManagerService extends DbService {
|
|
|
6241
6241
|
});
|
|
6242
6242
|
const writeRecords = () => from(this.DBOpened()).pipe(switchMap((opened) => {
|
|
6243
6243
|
if (!opened) {
|
|
6244
|
-
console.error(`createTableRecords: DB not open. Cannot write to '${tableName}'.`);
|
|
6244
|
+
// console.error(`createTableRecords: DB not open. Cannot write to '${tableName}'.`);
|
|
6245
6245
|
return EMPTY;
|
|
6246
6246
|
}
|
|
6247
6247
|
const tableInstance = this.getTable(tableName);
|
|
6248
6248
|
if (!tableInstance) {
|
|
6249
|
-
console.error(`createTableRecords: Table '${tableName}' does not exist in DB version ${this.verno}. Available:`, this.tables.map(t => t.name));
|
|
6249
|
+
// console.error(`createTableRecords: Table '${tableName}' does not exist in DB version ${this.verno}. Available:`, this.tables.map(t => t.name));
|
|
6250
6250
|
return EMPTY;
|
|
6251
6251
|
}
|
|
6252
|
-
console.log(`createTableRecords: Bulk putting ${insertRecords.length} records into ${tableName}`);
|
|
6252
|
+
// console.log(`createTableRecords: Bulk putting ${insertRecords.length} records into ${tableName}`);
|
|
6253
6253
|
return from(tableInstance.bulkPut(insertRecords)).pipe(map(() => insertRecords));
|
|
6254
6254
|
}));
|
|
6255
6255
|
const recreateMissingTableAndRetry = () => {
|
|
6256
6256
|
const inferredSchema = this.inferSchemaFromRecords(insertRecords);
|
|
6257
6257
|
if (!inferredSchema) {
|
|
6258
|
-
console.warn(`createTableRecords: Could not infer schema for '${tableName}'. Retrying after DB reopen.`);
|
|
6258
|
+
// console.warn(`createTableRecords: Could not infer schema for '${tableName}'. Retrying after DB reopen.`);
|
|
6259
6259
|
return from(this.createNewDatabase()).pipe(switchMap(() => writeRecords()));
|
|
6260
6260
|
}
|
|
6261
6261
|
const tableDef = TableSchemaDef.adapt({ table: tableName, schema: inferredSchema });
|
|
6262
6262
|
return this.createDatabaseTable(tableDef).pipe(switchMap((created) => {
|
|
6263
6263
|
if (!created) {
|
|
6264
|
-
console.warn(`createTableRecords: Failed to recreate table '${tableName}' from inferred schema. Retrying after DB reopen.`);
|
|
6264
|
+
// console.warn(`createTableRecords: Failed to recreate table '${tableName}' from inferred schema. Retrying after DB reopen.`);
|
|
6265
6265
|
return from(this.createNewDatabase()).pipe(switchMap(() => writeRecords()));
|
|
6266
6266
|
}
|
|
6267
6267
|
return writeRecords();
|
|
@@ -6271,7 +6271,7 @@ class DatabaseManagerService extends DbService {
|
|
|
6271
6271
|
if (!this.isMissingObjectStoreError(error)) {
|
|
6272
6272
|
throw error;
|
|
6273
6273
|
}
|
|
6274
|
-
console.warn(`createTableRecords: Missing object store for '${tableName}'. Recreating table and retrying once...`, error);
|
|
6274
|
+
// console.warn(`createTableRecords: Missing object store for '${tableName}'. Recreating table and retrying once...`, error);
|
|
6275
6275
|
return recreateMissingTableAndRetry().pipe(catchError((retryError) => {
|
|
6276
6276
|
console.error(`createTableRecords: Retry failed for '${tableName}'`, retryError);
|
|
6277
6277
|
throw retryError;
|
|
@@ -6887,7 +6887,7 @@ class HTTPManagerStateService extends ComponentStore {
|
|
|
6887
6887
|
console.log('Received:', message);
|
|
6888
6888
|
// Debug: Log all message types
|
|
6889
6889
|
this.logger.debug('StateStore', '📨 Message type', { type: message.type });
|
|
6890
|
-
if (message.error === 'JWT_INVALID') {
|
|
6890
|
+
if (message.error === 'JWT_INVALID' || message.error === 'AUTH_BLOCKED') {
|
|
6891
6891
|
this.shouldRetry = false;
|
|
6892
6892
|
this.httpManagerService.disconnect();
|
|
6893
6893
|
}
|