prismicio-community / php-kit

Community maintained development kit for Prismic and the PHP language
https://prismic.io
Other
108 stars 82 forks source link

Throw RuntimeException for missing ref in search form #76

Closed gsteel closed 9 years ago

gsteel commented 9 years ago

If you forget to set the ref for a search form, you'll get a 400 Error from the api for 'Bad Request'. By first checking existence of a ref before sending the request there's a clearer reason as to what went wrong and an HTTP request is saved.

erwan commented 9 years ago

Hi,

That's a good idea but that wouldn't work with previews, as we're using the token as ref.