Add the initial error handling when calling put