Get real status code instead of hardcoded 500

When event is an exception, get the real status code instead of always returning 500