Fixes #139 - not all api error message set the proper HTTP header.