Set status code for fails.