Rearranged ClientError and Error

Previously, ClientError (which extends error) was being called before Error, which caused a PHP error