fix: disable auto-retry and improve error messages in Agrarmonitor
Build and Push Multi-Platform Images / build-and-push (push) Successful in 43s
Build and Push Multi-Platform Images / build-and-push (push) Successful in 43s
- Set autoRetry: false and timeoutMs: 10000 in AgrarmonitorService - Show specific error message on timeout or backend error in frontend Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -48,7 +48,8 @@ export class AgrarmonitorService {
|
||||
password,
|
||||
cookieStore,
|
||||
autoLogin: true,
|
||||
autoRetry: true,
|
||||
autoRetry: false,
|
||||
timeoutMs: 10000,
|
||||
logger: this.logger,
|
||||
});
|
||||
|
||||
|
||||
@@ -2239,8 +2239,11 @@ function AgrarmonitorTab() {
|
||||
try {
|
||||
const data = await agrarmonitorApi.getStatus();
|
||||
setStatus(data);
|
||||
} catch {
|
||||
setStatus({ connected: false, registriert: null, freigeschaltet: null, error: 'Netzwerkfehler' });
|
||||
} catch (err: any) {
|
||||
const msg = err?.code === 'ECONNABORTED'
|
||||
? 'Timeout – Backend antwortet nicht rechtzeitig'
|
||||
: (err?.response?.data?.message ?? err?.message ?? 'Netzwerkfehler');
|
||||
setStatus({ connected: false, registriert: null, freigeschaltet: null, error: msg });
|
||||
} finally {
|
||||
setLoading(false);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user