             , (err, view) ->
               if err?
                 console.warn "Error creating DT view: #{err}"
+                return resp.send 500, error: "Error saving dataset: #{err}"
+
+              return resp.send 200, dataset
 
 # Add view to dataset and save
 addView = (req, resp) ->

    if err?
      console.log "USER #{user} CANNOT CREATE DATASET"
      return resp.send err.statusCode, err.error
    Box.create user, (err, box) ->
      if err?
        console.warn "Box.create failed #{err}"

              console.warn err
              return resp.send 500, error: "Error saving dataset: #{err}"


            _addView user, dataset,
              tool: 'datatables-view-tool'
