JesusFilm / core

JFP DS Engineering Monorepo
https://docs.core.jesusfilm.org/
18 stars 11 forks source link

fix: catch error when no video found #3678

Closed tataihono closed 19 hours ago

tataihono commented 20 hours ago

This pull request introduces error handling for cases where a video is not found in the database. The changes include importing necessary libraries, adding error handling in the video query resolver, and updating tests to cover the new error scenario.

Error handling improvements:

Testing enhancements:

Library imports:

linear[bot] commented 20 hours ago

ENG-1195 no video found error on api-media

codecov[bot] commented 20 hours ago

Codecov Report

Attention: Patch coverage is 85.71429% with 1 line in your changes missing coverage. Please review.

Project coverage is 91.84%. Comparing base (cf2f1f2) to head (cd606b8). Report is 3 commits behind head on main.

Files with missing lines Patch % Lines
apps/api-media/src/schema/video/video.ts 85.71% 1 Missing :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #3678 +/- ## ========================================== - Coverage 93.93% 91.84% -2.10% ========================================== Files 311 145 -166 Lines 5640 1471 -4169 Branches 744 179 -565 ========================================== - Hits 5298 1351 -3947 + Misses 272 93 -179 + Partials 70 27 -43 ``` | [Flag](https://app.codecov.io/gh/JesusFilm/core/pull/3678/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=JesusFilm) | Coverage Δ | | |---|---|---| | [apps.api-analytics](https://app.codecov.io/gh/JesusFilm/core/pull/3678/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=JesusFilm) | `?` | | | [apps.api-journeys](https://app.codecov.io/gh/JesusFilm/core/pull/3678/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=JesusFilm) | `?` | | | [apps.api-languages](https://app.codecov.io/gh/JesusFilm/core/pull/3678/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=JesusFilm) | `?` | | | [apps.api-media](https://app.codecov.io/gh/JesusFilm/core/pull/3678/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=JesusFilm) | `91.84% <85.71%> (-0.04%)` | :arrow_down: | Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=JesusFilm#carryforward-flags-in-the-pull-request-comment) to find out more.

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

stage-branch-merger[bot] commented 19 hours ago

I see you added the "on stage" label, I'll get this merged to the stage branch!