Beispiel #1
0
 /**
  * @inheritDoc
  */
 protected function getErrors()
 {
     return [Error::create()->setStatus(406)->setCode("MEDIA_TYPE_UNACCEPTABLE")->setTitle("The provided media type is unacceptable")->setDetail($this->getMessage())->setSource(ErrorSource::fromParameter("Accept"))];
 }
Beispiel #2
0
 /**
  * @inheritDoc
  */
 protected function getErrors()
 {
     return [Error::create()->setStatus(415)->setCode("MEDIA_TYPE_UNSUPPORTED")->setTitle("The provided media type is unsupported")->setDetail($this->getMessage())->setSource(ErrorSource::fromParameter("Content-Type"))];
 }
 /**
  * @inheritDoc
  */
 protected function getErrors()
 {
     return [Error::create()->setStatus(400)->setCode("QUERY_PARAM_UNRECOGNIZED")->setTitle("Query parameter is unrecognized")->setDetail("Query parameter '{$this->unrecognizedQueryParam}' can't be recognized by the endpoint!")->setSource(ErrorSource::fromParameter($this->unrecognizedQueryParam))];
 }
Beispiel #4
0
 /**
  * @inheritDoc
  */
 protected function getErrors()
 {
     return [Error::create()->setStatus(400)->setCode("INCLUSION_UNRECOGNIZED")->setTitle("Inclusion is unrecognized")->setDetail("Included paths '" . implode(", ", $this->unrecognizedIncludes) . "' can't be recognized by the endpoint!")->setSource(ErrorSource::fromParameter("include"))];
 }
Beispiel #5
0
 /**
  * @inheritDoc
  */
 protected function getErrors()
 {
     return [Error::create()->setStatus(400)->setCode("INCLUSION_UNSUPPORTED")->setTitle("Inclusion is unsupported")->setDetail("Inclusion is not supported by the endpoint!")->setSource(ErrorSource::fromParameter("include"))];
 }
Beispiel #6
0
 /**
  * @inheritDoc
  */
 protected function getErrors()
 {
     return [Error::create()->setStatus(400)->setCode("SORTING_UNSUPPORTED")->setTitle("Sorting is unsupported")->setDetail("Sorting is not supported by the endpoint!")->setSource(ErrorSource::fromParameter("sort"))];
 }
Beispiel #7
0
 /**
  * @inheritDoc
  */
 protected function getErrors()
 {
     return [Error::create()->setStatus(400)->setCode("SORTING_UNRECOGNIZED")->setTitle("Sorting paramter is unrecognized")->setDetail("Sorting parameter '{$this->sortParam}' can't be recognized by the endpoint!")->setSource(ErrorSource::fromParameter("sort"))];
 }