diff --git a/src/AbstractResponse.php b/src/AbstractResponse.php
index <HASH>..<HASH> 100644
--- a/src/AbstractResponse.php
+++ b/src/AbstractResponse.php
@@ -142,7 +142,7 @@ abstract class AbstractResponse
      * @param string $errorCode
      * @return mixed
      */
-    protected function withError($message, $errorCode)
+    public function withError($message, $errorCode)
     {
         return $this->withArray([
             'error' => [
Update method visibility to public for AbstractResponse::withError()