fix error mapping metadata