crs-tools / tracker

CRS Ticket Tracker
Apache License 2.0
18 stars 11 forks source link

empty response when working with non existant ticketid #219

Closed Garionion closed 4 years ago

Garionion commented 4 years ago

When talking to the api, using a ticket id which is not existant, the api response is empty instead of a proper description/error code

a-tze commented 4 years ago

Depending on the API call, this might be intended. Please specify the API call(s).

Garionion commented 4 years ago

I had this issue when using getTicketInfo.

jjeising commented 4 years ago

According to the code there should be an error. Needs testing.

pegro commented 4 years ago

Commit https://github.com/jjeising/framework/commit/b5d6144198cbb04c3c2578178f1156618bcc99b6 changed Log::handleException() to call exit(255), which terminates the PHP processing. I consider this an API breakage. So either all users switch to using Log::exception() or the API change should be rolled back.

jjeising commented 4 years ago

So either all users switch to using Log::exception() or the API change should be rolled back.

You're right. handleException() is only intended for set_exception_handler and should probably be protected or private, but I think that's not possible with static methods. Should probably prefix this method with an underscore.