 
       error = (response) ->
         $scope.saving = false
-        # TODO: handle error
+        $scope.error = true
 
       if $scope.widget.uid
         WalkingGuide.update($scope.widget).then(success, error)

            , delay
            findRoutePromises.push(promise)
        else
          console.error status # TODO: handle error

    getDelay = ->
      diff = Date.now() - lastQueryTimestamp

      $scope.resetSuggestions()

    $scope.resetSuggestions = ->
      clearErrors()
      $scope.suggestions = null
      $scope.currentPage = 0
      $scope.totalPages = -1

    $scope.clearRoute = ->
      clearErrors()
      for promise in findRoutePromises
        $timeout.cancel(promise)

