functions to allow return of detailed errors in xml