refac: migration crash, real-database tests, site deleted during create, ruels out of the repo, lists

This commit is contained in:
Florian Sylvain committed 2026-11-03 05:06:04 +01:00
1 parent 680b9a1308
commit 9d284e65a9
62 files changed
+1858 -987

No files matched your search

+1
View File
@@ -171,6 +171,7 @@ const SlugConflictErrorMessage = "slug_conflict"
const ConflictingArticlesHeader = "X-Conflicting-Articles"
const StoryMoveRequiredErrorMessage = "story_move_required"
const StoryBusyErrorMessage = "story_busy"
const TargetSiteDeletedErrorMessage = "target_site_deleted"
const ArticleNotFoundCode = "article_not_found"
const LanguageNotAvailableCode = "language_not_available"
+1
View File
@@ -86,6 +86,7 @@ var localizationSentinels = []sentinelResponse{
{language.ErrInvalidLanguage, apperr.InvalidLanguageErrorMessage, http.StatusUnprocessableEntity},
{language.ErrUnsupportedLanguage, apperr.UnsupportedLanguageErrorMessage, http.StatusUnprocessableEntity},
{transaction.ErrLockContention, apperr.StoryBusyErrorMessage, http.StatusConflict},
{domain.ErrTargetSiteDeleted, apperr.TargetSiteDeletedErrorMessage, http.StatusConflict},
}
func writeSentinel(w http.ResponseWriter, err error) bool {