checkSapMessageHeader method
void
checkSapMessageHeader()
Implementation
void checkSapMessageHeader() {
final sapMessage = headers['sap-message'] as String?;
final sapMessageContainsError =
sapMessage?.contains('"severity":"error"') ?? false;
if (sapMessageContainsError) {
final msg = _parseSapMessage(sapMessage!);
throw Exception('${msg.message}\n\n${msg.additionalInfo}');
}
}