       done()
     .fail (error) =>
       @logger.error error
-      done(error)
+      done(JSON.stringify(error))
 
   it 'should update a state', (done) ->
     @client.states.byId(@state.id).update(updateState(@state.version))

        done()
    .fail (error) =>
      @logger.error error
      done(error)


      done()
    .fail (error) =>
      @logger.error error
      done(JSON.stringify(error))

  afterEach (done) ->
    @client.states.byId(@state.id).delete(@state.version)
