]> source.dussan.org Git - rspamd.git/commitdiff
[Minor] Change error to the notice
authorVsevolod Stakhov <vsevolod@highsecure.ru>
Tue, 16 Nov 2021 10:08:06 +0000 (10:08 +0000)
committerVsevolod Stakhov <vsevolod@highsecure.ru>
Tue, 16 Nov 2021 10:09:12 +0000 (10:09 +0000)
With this change, Rspamd will no longer emit error codes on learn condition skipping.

Issue: #3956

src/libstat/stat_process.c

index 338dc3034f95fee0d7ca234052ca6bf057e81850..c697d2fd8de36d93c4611f279847d5737135a9fb 100644 (file)
@@ -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");