BlogCreate: isUploading stays true after createBlogPost/saveDraft HTTP error #1004

Closed
opened 2026-08-12 06:04:43 +00:00 by spikerj · 1 comment
Owner

Summary

In libraries/features/blog/src/lib/components/blog-create/blog-create.ts, both createBlogPost() and saveDraft() set isUploading to true then subscribe to blogService.createBlogPost with:

subscribe({
  next: () => { /* snack + reset */ },
  error: (error) => { /* snack only */ },
  complete: () => { this.isUploading.set(false); },
})

On Observable error, RxJS does not invoke complete. So isUploading remains true and the Publish / Save Draft buttons stay [disabled] until a full page reload.

Expected

Error path should clear isUploading (e.g. set false inside error, or use finalize(() => this.isUploading.set(false))).

Repro (unit)

Covered by blog-create.render.spec.ts — createBlogPost error snacks but leaves isUploading stuck and the saveDraft error arm.

Found during

Wave 6 coverage loop tick 2, agent a4 (blog/book).

## Summary In `libraries/features/blog/src/lib/components/blog-create/blog-create.ts`, both `createBlogPost()` and `saveDraft()` set `isUploading` to `true` then subscribe to `blogService.createBlogPost` with: ```ts subscribe({ next: () => { /* snack + reset */ }, error: (error) => { /* snack only */ }, complete: () => { this.isUploading.set(false); }, }) ``` On Observable **error**, RxJS does **not** invoke `complete`. So `isUploading` remains `true` and the Publish / Save Draft buttons stay `[disabled]` until a full page reload. ## Expected Error path should clear `isUploading` (e.g. set false inside `error`, or use `finalize(() => this.isUploading.set(false))`). ## Repro (unit) Covered by `blog-create.render.spec.ts` — `createBlogPost error snacks but leaves isUploading stuck` and the saveDraft error arm. ## Found during Wave 6 coverage loop tick 2, agent a4 (blog/book).
Author
Owner

Already present on spikersoft-angular master. createBlogPost / saveDraft error paths set isUploading to false, so Publish / Save Draft are not stuck disabled after HTTP failure. Closing.

Already present on `spikersoft-angular` `master`. `createBlogPost` / `saveDraft` error paths set `isUploading` to false, so Publish / Save Draft are not stuck disabled after HTTP failure. Closing.
Sign in to join this conversation.