Messaging API error code refactoring.