return error message instead of raising exception