embed error handling