extend api to be able to get a full error string instead of printing it