How to prevent Server Error if no req body?
Hi I have this code:
If no json is passed in the body i get this error:
Is there anyway to replace this with my own error message?
Like the one in my code ^ ?
If no json is passed in the body i get this error:
[ERROR] SyntaxError: Unexpected end of JSON inputIs there anyway to replace this with my own error message?
Like the one in my code ^ ?