This error is being thrown correctly but we are not catching it correctly somewhere. We should make sure that any call stack that calls this function is inside a react-query call so the error object is returned and displayed correctly in the UI for display to users