From 67b692c38900302aad69e58e375bb8f7c5554b69 Mon Sep 17 00:00:00 2001 From: Ming Date: Sun, 1 Sep 2024 22:12:43 +0800 Subject: [PATCH 1/2] feat: send error to rollbar when submit work experience form failed (#1434) --- .../ShareExperience/WorkExperiencesForm/TypeForm.js | 7 +++++++ src/constants/errorCodeMsg.js | 3 +++ 2 files changed, 10 insertions(+) diff --git a/src/components/ShareExperience/WorkExperiencesForm/TypeForm.js b/src/components/ShareExperience/WorkExperiencesForm/TypeForm.js index c471e0527..786f4e219 100644 --- a/src/components/ShareExperience/WorkExperiencesForm/TypeForm.js +++ b/src/components/ShareExperience/WorkExperiencesForm/TypeForm.js @@ -37,8 +37,10 @@ import { tabType } from '../../../constants/companyJobTitle'; import { createWorkExperienceWithRating } from 'actions/experiences'; import { transferKeyToSnakecase } from 'utils/objectUtil'; import { GA_CATEGORY, GA_ACTION } from 'constants/gaConstants'; +import { ERROR_CODE_MSG } from 'constants/errorCodeMsg'; import { sendEvent } from 'utils/hotjarUtil'; +import rollbar from 'utils/rollbar'; const header =
; @@ -137,6 +139,11 @@ const TypeForm = ({ open, onClose, hideProgressBar = false }) => { category: GA_CATEGORY.SHARE_WORK, action: GA_ACTION.UPLOAD_FAIL, }); + const errorCode = 'ER0020'; + rollbar.error( + `[${errorCode}] ${ERROR_CODE_MSG[errorCode].internal} ${error.message}`, + error, + ); }, []); return ( diff --git a/src/constants/errorCodeMsg.js b/src/constants/errorCodeMsg.js index 1643a9e19..a8d8fb302 100644 --- a/src/constants/errorCodeMsg.js +++ b/src/constants/errorCodeMsg.js @@ -78,4 +78,7 @@ export const ERROR_CODE_MSG = { ER0019: { internal: 'Not submittable', }, + ER0020: { + internal: 'Submit work experience failed', + }, }; From efa7ac5d7fae728f451740f21c42a8e0804dc040 Mon Sep 17 00:00:00 2001 From: YongChenSu <30387546+YongChenSu@users.noreply.github.com> Date: Mon, 2 Sep 2024 23:56:40 +0800 Subject: [PATCH 2/2] feat: add averageSectionRating queryQL query (#1436) --- src/graphql/jobTitle.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/graphql/jobTitle.js b/src/graphql/jobTitle.js index 3a181a1b3..89392875e 100644 --- a/src/graphql/jobTitle.js +++ b/src/graphql/jobTitle.js @@ -73,6 +73,7 @@ export const queryJobTitleOverviewGql = /* GraphQL */ ` reply_count like_count recommend_to_others + averageSectionRating } } salaryWorkTimesResult(start: 0, limit: $salaryWorkTimesLimit) { @@ -272,6 +273,7 @@ export const getJobTitleWorkExperiencesQuery = /* GraphQL */ ` reply_count like_count recommend_to_others + averageSectionRating } } }