code: public function getErrors()
      {
          if (!is_null($this->errors)) {
              return collect($this->errors);
          }
  
          try {
              $this->errors = $this->parse();
          } catch (\Exception $ex) {
              $this->errors = [];
          }
  
          return collect($this->errors);
      }
docs: Get any JSON API errors that are in the response.
  
  @return Collection