Slightly janky error handling