Skip to content

Commit 94dc747

Browse files
committed
Returning the error response to the user
1 parent 87f7ecb commit 94dc747

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

controllers/awsAccess.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,8 @@ export const addUserToAWSGroup = async (req, res) => {
3838
});
3939
} catch (error) {
4040
logger.error(`Error in adding user - ${userId} to AWS group - ${groupId} error - ${error}`);
41-
throw error;
41+
return res.status(500).json({
42+
error: `Something went wrong, please try again`
43+
});
4244
}
4345
};

0 commit comments

Comments
 (0)