Add error handling for backwards compat