Skip to content

Fix silently discarded save failures in Language/DictionaryItem/Webhook serializers - #1039

Merged
KevinJump merged 1 commit into
v17/mainfrom
fix/1038-language-serializer-discarded-attempt
Aug 16, 2026
Merged

KevinJump merged 1 commit into
v17/mainfrom
fix/1038-language-serializer-discarded-attempt

Conversation

@KevinJump

Copy link
Copy Markdown
Owner

Summary

  • LanguageSerializer.SaveItemAsync discarded the Attempt<ILanguage, LanguageOperationStatus> returned by ILanguageService.UpdateAsync/CreateAsync, so a save that Umbraco rejected (e.g. an ISO code the IsoCodeValidator doesn't accept) was silently dropped — uSync still counted the item as imported and reported the run as successful.
  • Audited for the same _ = await ... discard pattern (as suggested in the issue) and found the identical bug in DictionaryItemSerializer and WebhookSerializer; fixed all three the same way.
  • Each SaveItemAsync now checks attempt.Success and throws an InvalidOperationException (including the returned operation status) on failure. This is caught and reported by the existing handler exception handling, so the failure now surfaces in the import results and log instead of vanishing.

Fixes #1038

Test plan

  • dotnet build uSync.Core/uSync.Core.csproj succeeds
  • Manual repro from the issue (boot-time import with en-NG.config) confirms the failure is now reported rather than silent

🤖 Generated with Claude Code

…ok serializers

SaveItemAsync discarded the Attempt<T, Status> returned by ILanguageService,
IDictionaryItemService, and IWebhookService, so a failed create/update (e.g.
an ISO code rejected by Umbraco's IsoCodeValidator) was silently dropped
while the import still reported success. Now throws when the attempt fails,
so the failure surfaces in the import results and log instead of vanishing.

Fixes #1038

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@KevinJump
KevinJump merged commit 6504dce into v17/main Aug 16, 2026
4 checks passed
@KevinJump
KevinJump deleted the fix/1038-language-serializer-discarded-attempt branch August 16, 2026 06:27
KevinJump added a commit that referenced this pull request Aug 16, 2026
ContentTypeBaseSerializer (Media/Content/MemberType), ContentTypeSerializer,
DataTypeSerializer, DomainSerializer, TemplateSerializer, MediaSerializer,
and ContentSerializer all discarded (or logged-only) the Attempt/OperationResult
from their underlying Create/Update/Save/Delete calls, the same silent-failure
pattern fixed in #1038/#1039 for Language/DictionaryItem/Webhook. Each now
checks success and throws with the operation status/result on failure, so
the failure surfaces in the import results and log instead of being reported
as a successful import.

Co-authored-by: Claude Sonnet 5 <noreply@anthropic.com>
KevinJump added a commit that referenced this pull request Aug 16, 2026
ContentTypeBaseSerializer (Media/Content/MemberType), ContentTypeSerializer,
DataTypeSerializer, DomainSerializer, TemplateSerializer, MediaSerializer,
and ContentSerializer all discarded (or logged-only) the Attempt/OperationResult
from their underlying Create/Update/Save/Delete calls, the same silent-failure
pattern fixed in #1038/#1039 for Language/DictionaryItem/Webhook. Each now
checks success and throws with the operation status/result on failure, so
the failure surfaces in the import results and log instead of being reported
as a successful import.

Co-authored-by: Claude Sonnet 5 <noreply@anthropic.com>
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.

1 participant