getPdo(); $sth = $pdo->prepare("SELECT * FROM `failed_jobs`"); $sth->execute(); $res = $sth->fetchAll(\PDO::FETCH_ASSOC); if(count($res) > 0 ){ throw new HTTPException(500, "Failed Jobs"); } return $response; } // }