         if err and err.error is 'not_found'
             send error: "not found", 404
         else if err
-            send error: true, msg: err.message, 500
+            send error: err.message, 500
         else
             views = res.views
             request.get @appName, params, (path) =>

            db.save "_design/#{params.type}", design_doc, (err, res) ->
                if err
                    console.log "[Definition] err: " + JSON.stringify err
                    send error: true, msg: err.message, 500
                else
                    send success: true, 200

        else if err
            send error: true, msg: err.message, 500

        else
            views = res.views

                    db.merge "_design/#{params.type}", {views:views}, (err, res) ->
                        if err
                            console.log "[Definition] err: " + JSON.stringify err
                            send error: err.message, 500
                        else
                            send success: true, 204
