Skip to content

Commit 457f2d3

Browse files
committed
feat(portaswitch): add error code for missing contact exception
1 parent 4e59c0a commit 457f2d3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

app/bss/adapters/portaswitch/adapter.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -544,7 +544,7 @@ def retrieve_contact_by_user_id(self, session: SessionInfo, user: UserInfo, user
544544
"""Retrieve extension by User ID in the PBX"""
545545
account_info = self._admin_api.get_account_info(i_account=int(user_id)).get("account_info")
546546
if not account_info:
547-
raise WebTritErrorException(404, f"There is no an account with such id: {user_id}")
547+
raise WebTritErrorException(404, f"There is no an account with such id: {user_id}", code="contact_not_found")
548548

549549
return Serializer.get_contact_info_by_account(account_info, int(user.user_id))
550550

0 commit comments

Comments
 (0)