correctly read error message
fix message building