You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Places API returns 400 instead of 404 when a place isn't found #361
GET, PUT and DELETE /v1/places/{id} return 400 Place resource not found. for an unknown id or another organization's place. Orders, vehicles, drivers and fleets return 404 in the same case. The lookup is scoped correctly, so nothing is exposed; only the status code is off.
PlaceController calls its local apiError(), which defaults to 400, at lines 149, 256 and 272. VehicleController passes 404 explicitly.
Impact
Clients that map 404 to "not found" treat a missing place as a bad request, and need a special case for this one resource.
Proposed fix
- return $this->apiError('Place resource not found.');+ return $this->apiError('Place resource not found.', 404);
at the three call sites. CustomerController.php:539 ("Account not found.") and DriverController.php:89 ("Company not found.") fall back to 400 the same way.
Why
A small change that makes not-found handling the same across resources.
Thanks for the clear report. Confirmed: PlaceController::apiError() defaults to 400, and the three not-found paths didn't pass a status. The fix is in #373 (against release/v0.6.72): those paths now return 404, matching the other resources.
I left the two related call sites as they are. DriverController "Company not found." answers an invalid company input on create, so 400 still fits. CustomerController "Account not found." sits in the password-reset flow.
Activity
roncodes commentedon Oct 9, 2026
Thanks for the clear report. Confirmed:
PlaceController::apiError()defaults to 400, and the three not-found paths didn't pass a status. The fix is in #373 (againstrelease/v0.6.72): those paths now return 404, matching the other resources.I left the two related call sites as they are.
DriverController"Company not found." answers an invalidcompanyinput on create, so 400 still fits.CustomerController"Account not found." sits in the password-reset flow.