@@ -870,26 +870,26 @@ INSTANTIATE_TEST_SUITE_P(
870870 .test_name = " WithoutStack" ,
871871 .expected_json_str =
872872 R"( {"error":{"message":"The given namespace does not exist","type":"NoSuchNamespaceException","code":404}})" ,
873- .model = {.message = " The given namespace does not exist " ,
873+ .model = {.code = 404 ,
874874 .type = " NoSuchNamespaceException" ,
875- .code = 404 }},
875+ .message = " The given namespace does not exist " }},
876876 // Error with stack trace
877877 ErrorResponseParam{
878878 .test_name = " WithStack" ,
879879 .expected_json_str =
880880 R"( {"error":{"message":"The given namespace does not exist","type":"NoSuchNamespaceException","code":404,"stack":["a","b"]}})" ,
881- .model = {.message = " The given namespace does not exist " ,
881+ .model = {.code = 404 ,
882882 .type = " NoSuchNamespaceException" ,
883- .code = 404 ,
883+ .message = " The given namespace does not exist " ,
884884 .stack = {" a" , " b" }}},
885885 // Different error type
886886 ErrorResponseParam{
887887 .test_name = " DifferentError" ,
888888 .expected_json_str =
889889 R"( {"error":{"message":"Internal server error","type":"InternalServerError","code":500,"stack":["line1","line2","line3"]}})" ,
890- .model = {.message = " Internal server error " ,
890+ .model = {.code = 500 ,
891891 .type = " InternalServerError" ,
892- .code = 500 ,
892+ .message = " Internal server error " ,
893893 .stack = {" line1" , " line2" , " line3" }}}),
894894 [](const ::testing::TestParamInfo<ErrorResponseParam>& info) {
895895 return info.param .test_name ;
@@ -905,17 +905,17 @@ INSTANTIATE_TEST_SUITE_P(
905905 .test_name = " NullStack" ,
906906 .json_str =
907907 R"( {"error":{"message":"The given namespace does not exist","type":"NoSuchNamespaceException","code":404,"stack":null}})" ,
908- .expected_model = {.message = " The given namespace does not exist " ,
908+ .expected_model = {.code = 404 ,
909909 .type = " NoSuchNamespaceException" ,
910- .code = 404 }},
910+ .message = " The given namespace does not exist " }},
911911 // Stack field is missing (should deserialize to empty vector)
912912 ErrorResponseDeserializeParam{
913913 .test_name = " MissingStack" ,
914914 .json_str =
915915 R"( {"error":{"message":"The given namespace does not exist","type":"NoSuchNamespaceException","code":404}})" ,
916- .expected_model = {.message = " The given namespace does not exist " ,
916+ .expected_model = {.code = 404 ,
917917 .type = " NoSuchNamespaceException" ,
918- .code = 404 }}),
918+ .message = " The given namespace does not exist " }}),
919919 [](const ::testing::TestParamInfo<ErrorResponseDeserializeParam>& info) {
920920 return info.param .test_name ;
921921 });
0 commit comments