aboutsummaryrefslogtreecommitdiffstats
path: root/src/libstat/stat_process.c
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2021-11-16 10:08:06 +0000
committerVsevolod Stakhov <vsevolod@highsecure.ru>2021-11-16 10:09:12 +0000
commit58037bbffc0e3fd7873b6b411ea2c3aeb0f3ea91 (patch)
treeefd6bc79d615592b49c40c8b0b0cf2e4bef43531 /src/libstat/stat_process.c
parent6f0958f6f7532e50f3b08ab9c5e225acee723816 (diff)
downloadrspamd-58037bbffc0e3fd7873b6b411ea2c3aeb0f3ea91.tar.gz
rspamd-58037bbffc0e3fd7873b6b411ea2c3aeb0f3ea91.zip
[Minor] Change error to the notice
With this change, Rspamd will no longer emit error codes on learn condition skipping. Issue: #3956
Diffstat (limited to 'src/libstat/stat_process.c')
-rw-r--r--src/libstat/stat_process.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/libstat/stat_process.c b/src/libstat/stat_process.c
index 338dc3034..c697d2fd8 100644
--- a/src/libstat/stat_process.c
+++ b/src/libstat/stat_process.c
@@ -710,7 +710,7 @@ rspamd_stat_backends_learn (struct rspamd_stat_ctx *st_ctx,
/* XXX: must be error */
if (task->result->passthrough_result) {
/* Passthrough email, cannot learn */
- g_set_error (err, rspamd_stat_quark (), 500,
+ g_set_error (err, rspamd_stat_quark (), 204,
"Cannot learn statistics when passthrough "
"result has been set; not classified");
@@ -774,7 +774,7 @@ end:
return FALSE;
}
else if (!backend_found) {
- g_set_error(err, rspamd_stat_quark(), 404, "all learn conditions "
+ g_set_error(err, rspamd_stat_quark(), 204, "all learn conditions "
"denied learning %s in %s",
spam ? "spam" : "ham",
classifier ? classifier : "default classifier");