added exception handling for no invoice found