GitHub is home to over 20 million developers working together to host and review code, manage projects, and build software together.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
Already on GitHub? Sign in to your account
The JSON output class expects its data to be an array, and cannot handle a Frapi_Error object.
throwing the Frapi_Error causes it to be handled properly, but the default code template uses return if validation errors occur.
The generated action should throw Frapi_Error by default and the documentation may need to be updated to reflect this.
From the IRC meeting: We're going to update the template to correctly throw the error instead of returning it.
code reference: https://github.com/frapi/frapi/blob/master/src/frapi/admin/application/modules/default/models/Action.php#L527
throw Frapi_Error by default in Action template. #109