Added global rescue_from handlers to respond with JSON error messages (#27)