Alert to discord when server nodejs throw error 500

How to setup alert to discord when my server nodejs throw error InternalServer ?