Added generic status code handler for sending status code responses