matomo
matomo copied to clipboard
Provide non-200 error code when API method does not exist
Summary
Currently when sending a request to the Matomo API with a method that does not exist, the HTTP response has a 200 response code but an error message saying the method does not exist. For easier automated detection of this specific error, it would be useful if the response code was a specific error code (like bad request for example).
(Note for prioritisation: should be a quick change, but not needed, would be nice to have.)
Hi, is this issue still open?
Hi @camicacace, yes, the issue is still open and we'd welcome a PR if you wanted to have a go at creating one.
@michalkleiner I believe this issue has been solved, not sure which PR fixed it but on my local dev copy I seem to be able to elicit the desired behavior. Should we close the issue?
It indeed had been fixed, @jsantos42, via https://github.com/matomo-org/matomo/pull/22334. Thanks for the follow up, I'll close this issue now.