Skip to content

Fix silently discarded save failures in Language/DictionaryItem/Webhook serializers (v18 port) - #1040

Merged
KevinJump merged 1 commit into
v18/mainfrom
fix/1038-cherry-pick-v18
Aug 16, 2026
Merged

Fix silently discarded save failures in Language/DictionaryItem/Webhook serializers (v18 port)#1040
KevinJump merged 1 commit into
v18/mainfrom
fix/1038-cherry-pick-v18

Conversation

@KevinJump

@KevinJump KevinJump commented Aug 16, 2026

Copy link
Copy Markdown
Owner

Summary

Cherry-pick of #1039 from v17/main onto v18/main.

  • LanguageSerializer.SaveItemAsync, DictionaryItemSerializer.SaveItemAsync, and WebhookSerializer.SaveItemAsync discarded the Attempt<T, Status> returned by the underlying Umbraco service's 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.
  • Each SaveItemAsync now checks attempt.Success and throws an InvalidOperationException (including the returned operation status) on failure, so the failure surfaces in the import results and log instead of vanishing.

Fixes #1038 (v18 port)

Test plan

  • dotnet build uSync.Core/uSync.Core.csproj succeeds
  • Manual repro from the issue 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 d5b2ce7 into v18/main Aug 16, 2026
5 checks passed
@KevinJump
KevinJump deleted the fix/1038-cherry-pick-v18 branch August 16, 2026 06:36
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.

LanguageSerializer discards failed save results: languages silently dropped and the import reports success

1 participant