Ensure api errors remain strings + provide structural hints (#27563)
* - ensure errors are strings + provide strucrual hints Instead of just overwriting the (string) erorr messages, swap in the malli string description at [:errors :<field-name>] key. Adds humanized error (which highlights which parts of req were not sufficient) under the :specific-errors key. * fix tests + note about auto-cohersion
Showing
- src/metabase/api/common/internal.clj 8 additions, 5 deletionssrc/metabase/api/common/internal.clj
- test/metabase/api/action_test.clj 17 additions, 7 deletionstest/metabase/api/action_test.clj
- test/metabase/api/common/internal_test.clj 23 additions, 10 deletionstest/metabase/api/common/internal_test.clj
- test/metabase/util/malli/describe_test.clj 29 additions, 28 deletionstest/metabase/util/malli/describe_test.clj
Loading
Please register or sign in to comment