diff --git a/src/Exceptions/PropertyDoesNotExist.php b/src/Exceptions/PropertyDoesNotExist.php new file mode 100644 index 0000000..d9bd678 --- /dev/null +++ b/src/Exceptions/PropertyDoesNotExist.php @@ -0,0 +1,10 @@ +getAttribute('image_id'); + $id = $this->getAttribute('image_id'); + + if (is_null($id)) { + throw new PropertyDoesNotExist('Property [image_id] is missing from the response. Make sure you specify `image_id` inside the fields attribute.'); + } + + $id = '' . $id; if ($retina) { $size = Str::finish('' . $sizeFromEnum, '_2x');