run (); } catch (SessionExpiredException $e) { $this->httpError (403); } catch (BadLoginException $e) { $this->httpError (401); } catch (Exception $e) { $this->httpError (400); } } function httpError ($code) { } function setError ($message, $code) { http_response_code (400); } } ?>