Skip to content

Add single quotes around variables in API error messages#1798

Closed
Copilot wants to merge 2 commits intoenh-lad-errors-apifrom
copilot/sub-pr-1791
Closed

Add single quotes around variables in API error messages#1798
Copilot wants to merge 2 commits intoenh-lad-errors-apifrom
copilot/sub-pr-1791

Conversation

Copy link
Contributor

Copilot AI commented Feb 13, 2026

Adds single quotes around all variable values in API client error messages for consistency and improved readability.

Changes

Updated three error messages in dandi/dandiapi.py:

  • Dandiset not found: Quoted self.dandi_instance.gui URL

    f"View available Dandisets at '{self.dandi_instance.gui}'."
  • Asset not found (by ID): Quoted dandiset context string

    f"No such asset: {asset_id!r} for '{self}'"
  • Asset not found (by path): Quoted version identifier

    f"No asset at path {path!r} in version '{self.version_id}'."

Variables already using !r formatting retained their implicit quotes.


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Co-authored-by: CodyCBakerPhD <51133164+CodyCBakerPhD@users.noreply.github.com>
Copilot AI changed the title [WIP] Enhance API client error messages Add single quotes around variables in API error messages Feb 13, 2026
Copilot AI requested a review from CodyCBakerPhD February 13, 2026 22:03
@CodyCBakerPhD
Copy link
Contributor

Ah, it's OK just leave it for a dedicated follow-up

@codecov
Copy link

codecov bot commented Feb 13, 2026

Codecov Report

❌ Patch coverage is 0% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 50.45%. Comparing base (d3476d0) to head (16ced9c).

Files with missing lines Patch % Lines
dandi/dandiapi.py 0.00% 1 Missing ⚠️
Additional details and impacted files
@@                 Coverage Diff                 @@
##           enh-lad-errors-api    #1798   +/-   ##
===================================================
  Coverage               50.44%   50.45%           
===================================================
  Files                      84       84           
  Lines                   11920    11920           
===================================================
+ Hits                     6013     6014    +1     
+ Misses                   5907     5906    -1     
Flag Coverage Δ
unittests 50.45% <0.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.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants