Add error handling for custom onabord API