Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: OPTIC-1490: Safely reference content_type of the response so it does not error #6856

Open
wants to merge 6 commits into
base: develop
Choose a base branch
from

Conversation

bmartel
Copy link
Contributor

@bmartel bmartel commented Jan 6, 2025

PR fulfills these requirements

  • Commit message(s) and PR title follows the format [fix|feat|ci|chore|doc]: TICKET-ID: Short description of change made ex. fix: DEV-XXXX: Removed inconsistent code usage causing intermittent errors
  • Tests for the changes have been added/updated (for bug fixes/features)
  • Docs have been added/updated (for bug fixes/features)
  • Best efforts were made to ensure docs/code are concise and coherent (checked for spelling/grammatical errors, commented out code, debug logs etc.)
  • Self-reviewed and ran all changes on a local instance (for bug fixes/features)

Change has impacts in these area(s)

(check all that apply)

  • Product design
  • Backend (Database)
  • Backend (API)
  • Frontend

Describe the reason for change

There will be cases where the response has no content_type, which is the case of NotFound response objects. This just makes sure it is present before reading it.

Which logical domain(s) does this change affect?

ContextLog

@github-actions github-actions bot added the fix label Jan 6, 2025
Copy link

netlify bot commented Jan 6, 2025

Deploy Preview for label-studio-docs-new-theme ready!

Name Link
🔨 Latest commit 2ea604a
🔍 Latest deploy log https://app.netlify.com/sites/label-studio-docs-new-theme/deploys/677d3ef499f81300099ab041
😎 Deploy Preview https://deploy-preview-6856--label-studio-docs-new-theme.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link

netlify bot commented Jan 6, 2025

Deploy Preview for heartex-docs ready!

Name Link
🔨 Latest commit 2ea604a
🔍 Latest deploy log https://app.netlify.com/sites/heartex-docs/deploys/677d3ef4ba05730008473d36
😎 Deploy Preview https://deploy-preview-6856--heartex-docs.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link

codecov bot commented Jan 6, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 76.79%. Comparing base (e320bbe) to head (2ea604a).
Report is 6 commits behind head on develop.

Additional details and impacted files
@@           Coverage Diff            @@
##           develop    #6856   +/-   ##
========================================
  Coverage    76.79%   76.79%           
========================================
  Files          171      171           
  Lines        14030    14030           
========================================
+ Hits         10774    10775    +1     
+ Misses        3256     3255    -1     
Flag Coverage Δ
pytests 76.79% <100.00%> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

label_studio/core/utils/contextlog.py Outdated Show resolved Hide resolved
@bmartel bmartel requested a review from mcanu January 7, 2025 14:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants