Skip to content

Commit

Permalink
fix(friends-requests): reverted error return changes
Browse files Browse the repository at this point in the history
  • Loading branch information
ThomBos authored and ThomBos committed Jul 13, 2022
1 parent 234ed16 commit 2343ad7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions libraries/Iridium/friends/FriendsManager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -195,11 +195,11 @@ export default class FriendsManager extends Emitter<IridiumFriendPubsub> {
async requestCreate(remotePeerDID: string, incoming = false, user: User) {
if (this.isFriend(remotePeerDID)) {
logger.error('iridium/friends', 'already a friend', { remotePeerDID })
throw FriendsError.FRIEND_EXISTS
throw new Error(FriendsError.FRIEND_EXISTS)
}
if (this.hasRequest(remotePeerDID)) {
logger.error('iridium/friends', 'request already exists')
throw FriendsError.REQUEST_ALREADY_SENT
throw new Error(FriendsError.REQUEST_ALREADY_SENT)
}
logger.info('iridium/friends', 'creating friend request', {
remotePeerDID,
Expand Down

0 comments on commit 2343ad7

Please sign in to comment.