Add error messages for API authorization.
Merge branch 'release0.4'