From 9299dc60f489d736aace95109e7587b6fd4031d3 Mon Sep 17 00:00:00 2001 From: Damien Elmes Date: Wed, 27 Jan 2021 14:23:28 +1000 Subject: [PATCH] suggest DB check if HTTP status 400 is returned --- rslib/src/err.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/rslib/src/err.rs b/rslib/src/err.rs index 2c087d63f..bca42c1b5 100644 --- a/rslib/src/err.rs +++ b/rslib/src/err.rs @@ -325,6 +325,10 @@ fn error_for_status_code(info: String, code: StatusCode) -> AnkiError { kind: SyncErrorKind::ServerError, } } + S::BAD_REQUEST => AnkiError::SyncError { + info, + kind: SyncErrorKind::DatabaseCheckRequired, + }, _ => AnkiError::NetworkError { info, kind: NetworkErrorKind::Other,