src/Database/AbstractModel.php
protected static function commonError(Response $response, \Exception $ex): Response
    {
        $data = [
            "message" => "Somethings are wrong",
            "status" => "error"
        ];

        if (cfg::htrFileConfigs()->devmode ?? false) {
            $data['dev_error'] = $ex->getMessage();
        }
        return $response->withJson($data, 500);
    }
protected static function commonError(Response $response, \Exception $ex): Response
    {
        $data = [
            "message" => "Somethings are wrong",
            "status" => "error"
        ];

        if (cfg::htrFileConfigs()->devmode ?? false) {
            $data['dev_error'] = $ex->getMessage();
        }
        return $response->withJson($data, 500);
    }
protected static function commonError ( Response $ response , \ Exception $ ex ) : Response { $ data = [ "message" => "Somethings are wrong" , "status" => "error" ] ; if ( cfg :: htrFileConfigs ( ) -> devmode ?? false ) { $ data [ 'dev_error' ] = $ ex -> getMessage ( ) ; } return $ response -> withJson ( $ data , 500 ) ; }
Return the Response Object configured with common error

@author Edson B S Monteiro <bruno.monteirodg@gmail.com>
@since 1.0
@param Response $response
@param \Exception $ex
@return Response
Return the Response Object configured with common error