api: add negative tests for WriteResponse. Fix issue in one error message