make error structure conformant with spec