diff options
-rw-r--r-- | src/codec-json/json.tmpl.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/codec-json/json.tmpl.h b/src/codec-json/json.tmpl.h index 2bbfa5d..4b3a1a2 100644 --- a/src/codec-json/json.tmpl.h +++ b/src/codec-json/json.tmpl.h @@ -483,7 +483,7 @@ struct json_decode<schema::Struct<schema::Member<T,Lits>...>, RootSchema, ToDeco constexpr static string_literal Literal = parameter_key_pack_type<i, Lits...>::literal; if(search_name == Literal.view()){ if(fields[i]){ - return make_error<err::already_exists>(); + return make_error<err::invalid_state>(); } fields[i] = true; auto eov = json_decode<Type, RootSchema, ToDecode>::decode(buff, to.template get<Literal>()); |