Skip to content

fix: do not empty document if error#90

Merged
auniverseaway merged 1 commit intomainfrom
emptied
Sep 23, 2025
Merged

fix: do not empty document if error#90
auniverseaway merged 1 commit intomainfrom
emptied

Conversation

@kptdobe
Copy link
Contributor

@kptdobe kptdobe commented Sep 23, 2025

This fixes the unexpected document being emptied.

The root cause is: if persistence.get fires an exception, the current version of the document is considered as empty. If current is null, something went wrong. This happens from time to time while fetching from daadmin. Cloudflare has some random worker errors but also author might have been logged out, i.e. the daadmin call returns a 401.

@github-actions
Copy link

LCOV of commit c3af674 during Install, lint, and test #211

Summary coverage rate:
  lines......: 95.2% (1637 of 1719 lines)
  functions..: 96.6% (57 of 59 functions)
  branches...: no data found

Files changed coverage rate:
                  |Lines       |Functions  |Branches    
  Filename        |Rate     Num|Rate    Num|Rate     Num
  ======================================================
  src/shareddoc.js| 3.3%    583| 0.0%    19|    -      0

@auniverseaway auniverseaway merged commit a406add into main Sep 23, 2025
3 checks passed
@auniverseaway auniverseaway deleted the emptied branch September 23, 2025 13:46
adobe-bot pushed a commit that referenced this pull request Dec 8, 2025
# 1.0.0 (2025-12-08)

### Bug Fixes

* add check for shared secret ([#108](#108)) ([a79731f](a79731f))
* add span to known HTML tags ([#101](#101)) ([fbf016d](fbf016d))
* do not empty document if error ([#90](#90)) ([a406add](a406add))
* encode HTML brackets ([#100](#100)) ([6c5b5fd](6c5b5fd))
* encode HTML brackets ([#74](#74)) ([015163e](015163e))
* keep content if no main found in html ([#85](#85)) ([9fd25ac](9fd25ac))
* null doc crashes aem2doc ([#84](#84)) ([6197114](6197114))
* ommit stacktraces in error map for non-dev ([#110](#110)) ([1f896ac](1f896ac))
* remove html comments ([#68](#68)) ([cf05aae](cf05aae))

### Features

* disable stack traces on production ([#109](#109)) ([79c40bd](79c40bd))
* Prevent implicit document creation via If-Match header ([#105](#105)) ([b33ae65](b33ae65))
adobe-bot pushed a commit that referenced this pull request Dec 8, 2025
# 1.0.0 (2025-12-08)

### Bug Fixes

* add check for shared secret ([#108](#108)) ([a79731f](a79731f))
* add span to known HTML tags ([#101](#101)) ([fbf016d](fbf016d))
* do not empty document if error ([#90](#90)) ([a406add](a406add))
* encode HTML brackets ([#100](#100)) ([6c5b5fd](6c5b5fd))
* encode HTML brackets ([#74](#74)) ([015163e](015163e))
* keep content if no main found in html ([#85](#85)) ([9fd25ac](9fd25ac))
* null doc crashes aem2doc ([#84](#84)) ([6197114](6197114))
* ommit stacktraces in error map for non-dev ([#110](#110)) ([1f896ac](1f896ac))
* remove html comments ([#68](#68)) ([cf05aae](cf05aae))
* trigger release ([ca061d4](ca061d4))

### Features

* disable stack traces on production ([#109](#109)) ([79c40bd](79c40bd))
* Prevent implicit document creation via If-Match header ([#105](#105)) ([b33ae65](b33ae65))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants