fix(iam): expose scoped account metadata and avoid duplicate notices

This commit is contained in:
2026-10-30 11:50:55 +08:00
parent 27cab30c48
commit a32e167f8b
4 changed files with 52 additions and 7 deletions
@@ -26,7 +26,7 @@ final class IamV2Controller extends BaseAdminController
return $this->data($fn())->header(['Cache-Control' => 'no-store', 'Referrer-Policy' => 'no-referrer']);
} catch (\Throwable $e) {
$code = preg_match('/^[A-Z_]{3,64}$/D', $e->getMessage()) ? $e->getMessage() : 'SERVICE_UNAVAILABLE';
return $this->fail($code, ['error' => ['code' => $code]])->header(['Cache-Control' => 'no-store']);
return $this->fail($code, ['error' => ['code' => $code]], 0, 0)->header(['Cache-Control' => 'no-store']);
}
}
private function session(bool $recent = false): array