Hacker News new | past | comments | ask | show | jobs | submit login

The only validation function I've written contains this:

    throw({forbidden: 'Only administrators can write changes'});
IIRC, it raises either a 401 or 403 HTTP error.



Consider applying for YC's Fall 2025 batch! Applications are open till Aug 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: