https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17428 --- Comment #15 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- (In reply to Jonathan Druart from comment #12)
Comment on attachment 56314 [details] [review] Bug 174828: Followup - More RESTfull handling of endpoints
Review of attachment 56314 [details] [review]: -----------------------------------------------------------------
::: t/db_dependent/api/v1/cities.t @@ +96,5 @@
$tx = $t->ua->build_tx( GET => '/api/v1/cities?city_blah=blah' ); $tx->req->cookies( { name => 'CGISESSID', value => $session_id } ); $tx->req->env( { REMOTE_ADDR => $remote_address } ); + $t->request_ok($tx)->status_is(200) + ->json_is( [ $city, $another_city, $city_with_another_country ] );
I'd like to make sure this is the expected behaviour. It will make debug less easier. Could you find resources/best practices about that please?
From an api consumers stand point I totally agree it's nicer to receive an error as apposed to silently throwing away the incorrect parameters.
I'm going to implement a standard error response for such a case in it's own bug and make this patch depend upon it. -- You are receiving this mail because: You are watching all bug changes.