How to improve error state design?