codemix / restyii

A RESTful extension for Yii.
15 stars 10 forks source link

[REVIEW][MERGE] Added HTTP error catching to resource fetcher. #36

Closed JorgenSmith closed 11 years ago

JorgenSmith commented 11 years ago

Will provide meaningful exception when not authenticated Related to https://github.com/codemix/restyii/issues/35 .

JorgenSmith commented 11 years ago

@mikehaertl or @phpnode can this please be merged? I just discovered another instance where this would have saved me some time.

I.e. would give me Error fetching productVariant. CHttpException: Unable to resolve the request "productVariant/options".'

Instead of `exception 'CException' with message 'Property "Restyii\Client\Schema\Resource.code" is not defined.'``

which the master currently gives

JorgenSmith commented 11 years ago

(In this case the reason was that I had forgotten to create a controller file for a new resource)

JorgenSmith commented 11 years ago

Latest rebase caused a number of files to sneak into the PR. Closing and creating a new one; sorry.