How to use the FORBIDDEN function from http-status-codes

Find comprehensive JavaScript http-status-codes.FORBIDDEN code examples handpicked from public code repositorys.

199
200
201
202
203
204
205
206
207
208
if (index < 0 || index >= self[rc].length) return callback(new Error("Edit Review Comment, Index out of Range"));


if (self[rc][index].user !== user.OSMUser) {
  const error = new Error(">" + user.OSMUser + "< is not allowed to change review");
  error.status = HttpStatus.FORBIDDEN;
  return callback(error);
}

// nothing to change.
fork icon10
star icon27
watch icon6

+ 5 other calls in file