<% if @error %> {"success": false, "reason": <%= @error.to_s.to_json %>} <% else %> {"success": true} <% end %>