We have been generating customer invoices for customers using the API for years. Monday we tracked a null reference error in our code down to a single InvoiceDetail record with a null Customer ID (see screenshot) and a $36 credit. To get invoices done Monday we coded to skip records where this is null. We DO NOT want to keep this code change in place. Code snippet attached. We'd like to know how it happened and be assured it won't happen again. Original ticket filed in Partner Center; was referred to here.

code_snippet.txt
We have been generating customer invoices for customers using the API for years. Monday we tracked a null reference error in our code down to a single InvoiceDetail record with a null Customer ID (see screenshot) and a $36 credit. To get invoices done Monday we coded to skip records where this is null. We DO NOT want to keep this code change in place. Code snippet attached. We'd like to know how it happened and be assured it won't happen again. Original ticket filed in Partner Center; was referred to here.
code_snippet.txt