Fix EZP-21662: The JS REST client's CAPIError Class major refactoring
CS fixes