Access to the error message is needed in different contexts. Now the extraction code itself can be shared.