src/DorcasResponse.php
public function getErrors(bool $asObject = false)
    {
        $errors = $this->data['errors'] ?? [];
        return $asObject ? (object) $errors : $errors;
    }
public function getErrors(bool $asObject = false)
    {
        $errors = $this->data['errors'] ?? [];
        return $asObject ? (object) $errors : $errors;
    }
public function getErrors ( bool $ asObject = false ) { $ errors = $ this -> data [ 'errors' ] ?? [ ] ; return $ asObject ? ( object ) $ errors : $ errors ; }
Returns the errors in the response, if any.

@param bool $asObject

@return array|mixed|object
Returns the errors in the response if any .