I changed to return 0 after logging the error.