src/Http/ErrorResponseBuilder.php
protected function buildErrorData()
    {
        if (is_null($this->errorCode)) {
            return null;
        }

        $data = [
            'code' => $this->errorCode,
            'message' => $this->message ?: $this->resolveMessage()
        ];

        return array_merge($data, $this->data);
    }
protected function buildErrorData()
    {
        if (is_null($this->errorCode)) {
            return null;
        }

        $data = [
            'code' => $this->errorCode,
            'message' => $this->message ?: $this->resolveMessage()
        ];

        return array_merge($data, $this->data);
    }
protected function buildErrorData ( ) { if ( is_null ( $ this -> errorCode ) ) { return null ; } $ data = [ 'code' => $ this -> errorCode , 'message' => $ this -> message ? : $ this -> resolveMessage ( ) ] ; return array_merge ( $ data , $ this -> data ) ; }
Build the error object of the serialized response data.

@return array|null
Build the error object of the serialized response data .