V3 Hardening & Fixes: Structured Errors, JWT Fallbacks, and Module Stability
- Implemented Structured Error Handling across GET/POST/PATCH helpers to extract rich V3 error metadata. - Added direct localStorage fallback for JWT detection to resolve race conditions during initial page load. - Fixed async race condition in Archives leading to 'archive_content_li is undefined' crash. - Hardened generic object processor to handle non-array API responses gracefully. - Resolved zero-result bug in Event Search by using raw 'account_id_random' to bypass backend mapping conflicts. - Isolated bootstrap headers in +layout.ts and removed invalid response headers from request config. - Enhanced /testing dashboard with live header inspection and V3 hardening audits.
This commit is contained in:
@@ -443,7 +443,7 @@ export async function qry_ae_obj_li__event({
|
||||
log_lvl?: number;
|
||||
}) {
|
||||
const search_query: any = { and: [] };
|
||||
|
||||
|
||||
if (qry_str) {
|
||||
// Use reserved 'q' property for global full-text search as per V3 Guide
|
||||
search_query.q = qry_str;
|
||||
@@ -495,14 +495,16 @@ export async function qry_ae_obj_li__event({
|
||||
}
|
||||
|
||||
// Location Filtering (Inclusive OR logic)
|
||||
// If either filter is explicitly true, we restrict results.
|
||||
// If both are false or null, we show everything.
|
||||
if (qry_physical === true || qry_virtual === true) {
|
||||
const ev_physical = ev.physical === true || ev.physical === 1 || ev.physical === '1';
|
||||
const ev_virtual = ev.virtual === true || ev.virtual === 1 || ev.virtual === '1';
|
||||
|
||||
|
||||
let match = false;
|
||||
if (qry_physical === true && ev_physical) match = true;
|
||||
if (qry_virtual === true && ev_virtual) match = true;
|
||||
|
||||
|
||||
if (!match) return false;
|
||||
}
|
||||
|
||||
@@ -624,16 +626,16 @@ export async function qry_ae_obj_li__event_v2({
|
||||
}
|
||||
|
||||
// Location Filtering (Inclusive OR logic)
|
||||
// If either filter is explicitly true, we restrict results.
|
||||
// If either filter is explicitly true, we restrict results.
|
||||
// If both are false or null, we show everything.
|
||||
if (qry_physical === true || qry_virtual === true) {
|
||||
const ev_physical = ev.physical === true || ev.physical === 1 || ev.physical === '1';
|
||||
const ev_virtual = ev.virtual === true || ev.virtual === 1 || ev.virtual === '1';
|
||||
|
||||
|
||||
let match = false;
|
||||
if (qry_physical === true && ev_physical) match = true;
|
||||
if (qry_virtual === true && ev_virtual) match = true;
|
||||
|
||||
|
||||
if (!match) return false;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user