Refine admin companies layout and relax provisioning schema

This commit is contained in:
Esdras Renan 2025-10-15 23:19:24 -03:00
parent 2cba553efa
commit 43230e0310
4 changed files with 573 additions and 142 deletions

View file

@ -136,15 +136,20 @@ export function AuthProvider({ children }: { children: React.ReactNode }) {
const message =
(payload && typeof payload.error === "string" && payload.error.trim()) || fallbackMessage
if (!cancelled) {
const debugPayload = {
status: response.status,
message,
payload,
timestamp: new Date().toISOString(),
}
console.error("[auth] machine context request failed", debugPayload)
if (typeof window !== "undefined") {
window.__machineContextDebug = debugPayload
// For 401/403/404 we silently ignore: most browsers hitting the
// web app are not machines and won't have a machine session.
if (response.status !== 401 && response.status !== 403 && response.status !== 404) {
const debugPayload = {
status: response.status,
message,
payload,
timestamp: new Date().toISOString(),
}
// Use warn to reduce noise in production consoles
console.warn("[auth] machine context request failed", debugPayload)
if (typeof window !== "undefined") {
window.__machineContextDebug = debugPayload
}
}
setMachineContext(null)
setMachineContextError({