Skip to content

Commit 6027d36

Browse files
Michał Fąferekmfaferek93
authored andcommitted
fix: map PREFAILED fault status to pending in UI
Faults with API status PREFAILED were falling through to the default 'active' mapping, making them visually identical to CONFIRMED faults. Fixes #36
1 parent eefd9ee commit 6027d36

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/lib/sovd-api.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1557,7 +1557,7 @@ export class SovdApiClient {
15571557
const apiStatus = apiFault.status?.toLowerCase() || '';
15581558
if (apiStatus === 'confirmed' || apiStatus === 'active') {
15591559
status = 'active';
1560-
} else if (apiStatus === 'pending') {
1560+
} else if (apiStatus === 'pending' || apiStatus === 'prefailed') {
15611561
status = 'pending';
15621562
} else if (apiStatus === 'cleared' || apiStatus === 'resolved') {
15631563
status = 'cleared';

0 commit comments

Comments
 (0)