Handling 503 and 500 responses appropriately