+ // TRANS: Client exception thrown when subscribing to a non-existing profile.
+ // TRANS: %s is the unknown profile ID.
+ $this->clientError(sprintf(_('Unknown profile %s.'), $person->id));
+ return;
+ }
+
+ if (Subscription::exists($this->_profile, $profile)) {
+ // 409 Conflict
+ // TRANS: Client error displayed trying to subscribe to an already subscribed profile.
+ // TRANS: %s is the profile the user already has a subscription on.
+ $this->clientError(sprintf(_('Already subscribed to %s.'),
+ $person->id),
+ 409);