Added handling for string based errors