Shared error helper.