adds support for ErrorDetail flag