fix: load accounting connectors even when config endpoint fails
All checks were successful
Deploy Nyla Frontend to Production / deploy (push) Successful in 45s
All checks were successful
Deploy Nyla Frontend to Production / deploy (push) Successful in 45s
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
parent
5f47dd395c
commit
36e57a0ab4
1 changed files with 8 additions and 4 deletions
|
|
@ -88,10 +88,14 @@ export const TrusteeAccountingSettingsView: React.FC = () => {
|
|||
if (!instanceId) return;
|
||||
setLoading(true);
|
||||
try {
|
||||
const [availableConnectors, config] = await Promise.all([
|
||||
fetchAccountingConnectors(request, instanceId),
|
||||
fetchAccountingConfig(request, instanceId),
|
||||
]);
|
||||
const connectorsPromise = fetchAccountingConnectors(request, instanceId);
|
||||
let config: AccountingConfig = { configured: false };
|
||||
try {
|
||||
config = await fetchAccountingConfig(request, instanceId);
|
||||
} catch (configErr: any) {
|
||||
console.error('Failed to load accounting config:', configErr);
|
||||
}
|
||||
const availableConnectors = await connectorsPromise;
|
||||
setConnectors(availableConnectors || []);
|
||||
setExistingConfig(config);
|
||||
if (config?.configured && config.connectorType) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue