fix error handling in get_note