return error message rather than throwing error