reformat error message from server