json.extract! @error, :message, :type