clients/apps/web/src
Alex b85e096b49
[PM-33067] Fix false success toast when mark/unmark critical apps API fails (#19344)
* fix(dirt): check response.error before showing success toast for critical apps

The orchestrator's catchError converts API failures into next emissions
with response.error set. The component's next handler was unconditionally
showing a success toast without checking this field.

Now checks response.error and shows an error toast when the API call
failed. Selection is preserved on error so users can retry.

Also ensures updatingCriticalApps signal is reset on all paths (success,
caught error, and uncaught error).

[PM-33067]

* test(dirt): add tests for mark/unmark critical apps error handling

Tests verify that:
- Success toast shown when response.error is null
- Error toast shown when response.error is non-null
- Selection preserved on error, cleared on success

[PM-33067]

* fix(dirt): use specific error toast for unmark critical apps failure

Replace generic "An unexpected error has occurred" with
"Failed to unmark applications as critical" for consistency
with the mark-as-critical error toast.

* fix(dirt): check response.error in Review New Applications mark critical

The AllApplicationsComponent (Review New Applications widget) had the
same false success toast bug as the All Applications tab. The next
handler ignored the response parameter entirely, showing a success
toast even when response.error was set by the orchestrator's catchError.

Now checks response.error before showing toast. On error: shows
"Failed to mark applications as critical" and preserves selection.
Also resets markingAsCritical on all paths.

Adds unit tests for mark success and error paths.

[PM-33067]

* Revert "fix(dirt): check response.error in Review New Applications mark critical"

This reverts commit b646598613.

* fix(dirt): check response.error in application review dialog before showing success toast

The saveApplicationReviewStatus$ orchestrator method uses catchError
to convert API failures into next emissions with response.error set.
The dialog used firstValueFrom inside try/catch, but since catchError
prevents the Observable from erroring, firstValueFrom resolves
successfully and the catch block never fires.

Now checks response.error on the resolved value before showing the
success toast. On error: shows "Error saving review status" and
stays on the dialog so the user can retry.

[PM-33067]
2026-03-31 14:53:36 -07:00
..
app [PM-31885] Consolidate all Send policies to a single policy (#19314) 2026-03-31 13:57:01 -07:00
connectors feat(redirect): [PM-26578] Https Redirection for Cloud Users (#17873) 2026-03-24 16:48:39 -04:00
images [PM-33167] Replace img with TwoFactorIcon component (#19865) 2026-03-31 20:22:55 +02:00
locales [PM-33067] Fix false success toast when mark/unmark critical apps API fails (#19344) 2026-03-31 14:53:36 -07:00
scss [PM-33167] Replace img with TwoFactorIcon component (#19865) 2026-03-31 20:22:55 +02:00
utils [deps] SM: Update typescript-eslint monorepo to v8 (major) (#10601) 2025-01-14 11:23:59 -05:00
videos [PM-27619] assign tasks component (#17125) 2025-11-03 15:25:19 +00:00
.nojekyll
404.html [CL-805] [CL-521] anon layout illustrations (#16002) 2025-08-20 15:06:24 -04:00
app-id.json
browserconfig.xml
favicon.ico
global.d.ts
index.html [PM-32212] Migrate platform font icons to bit-icon (#18970) 2026-02-13 09:43:42 -05:00
main.ts [PM-17407] [CL-665] Remove jQuery and Popper.js (#14621) 2025-05-13 21:36:26 +02:00
manifest.json
polyfills.ts Improve SDK direct function usage (#13353) 2025-02-26 09:08:42 +01:00
theme.ts [PM-23374] Default to system theme in web app (#15755) 2025-07-25 15:33:14 -04:00
translation-constants.ts Add tamil language support to desktop and web (#16334) 2025-09-08 10:45:41 -04:00
version.json