synapsestudios/synapse-base — pull request #103 by synbot (2014-07-29 16:33:46+00:00)
Title: AbstractRestController should catch exceptions and return a 500 response if caught

This will make debugging easier, since the response returned by the ExceptionHandler used by Silex is not handled correctly by Chrome or Lively for reasons unknown to me.

Make sure the response is in JSON with the error message in a property called 'error'.

In a production environment, the message should be generic. In other environments it should return an additional 'trace' property that includes the stack trace.