More robust APIs with promise rejection handling.