Summary
Remove the inlined try { ... } catch (err) { console.error(err); throw err } wrapper from every
query/mutation once the shared axios instance handles logging centrally.
Blocked on prompt-edu/prompt-shared-state#59 (shared request error handling).
What is duplicated (verified, ~130 files)
The identical wrapper across the network layers of assessment (~58), team_allocation (~21),
self_team_allocation (~12), certificate (~5), example (~1):
clients/example_component/.../network/queries/getExampleInfo.ts:3
clients/assessment_component/.../network/queries/getCoursePhaseParticipations.ts:6
Work
- After the shared response interceptor lands, strip the try/catch from the ~130 call sites so each
function is just return (await instance.get/post(url)).data.
Summary
Remove the inlined
try { ... } catch (err) { console.error(err); throw err }wrapper from everyquery/mutation once the shared axios instance handles logging centrally.
Blocked on prompt-edu/prompt-shared-state#59 (shared request error handling).
What is duplicated (verified, ~130 files)
The identical wrapper across the network layers of assessment (~58), team_allocation (~21),
self_team_allocation (~12), certificate (~5), example (~1):
clients/example_component/.../network/queries/getExampleInfo.ts:3clients/assessment_component/.../network/queries/getCoursePhaseParticipations.ts:6Work
function is just
return (await instance.get/post(url)).data.