Skip to content

Update test assertions for enhanced API error messages#1801

Merged
CodyCBakerPhD merged 2 commits intoenh-lad-errors-apifrom
copilot/sub-pr-1791-again
Feb 14, 2026
Merged

Update test assertions for enhanced API error messages#1801
CodyCBakerPhD merged 2 commits intoenh-lad-errors-apifrom
copilot/sub-pr-1791-again

Conversation

Copy link
Contributor

Copilot AI commented Feb 14, 2026

Previous commits enhanced API client error messages with troubleshooting guidance. Test assertions needed updates to match the new message formats.

Changes

  • test_dandiarchive.py: Updated 8 assertions across 7 test functions for "No such Dandiset", "No such asset", and "No asset at path" errors
  • test_delete.py: Updated 1 assertion for "No such Dandiset" error

Error Message Formats

Before:

assert str(excinfo.value) == "No such Dandiset: '999999'"

After:

assert str(excinfo.value) == (
    "No such Dandiset: '999999'. "
    "Verify the Dandiset ID is correct and that you have access. "
)

Similar updates for asset-related errors now include references to dandi ls and version context where applicable.


💡 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.

Copilot AI self-assigned this Feb 14, 2026
@codecov
Copy link

codecov bot commented Feb 14, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 75.11%. Comparing base (75daea4) to head (51dbd8f).
⚠️ Report is 13 commits behind head on enh-lad-errors-api.

Additional details and impacted files
@@                   Coverage Diff                   @@
##           enh-lad-errors-api    #1801       +/-   ##
=======================================================
+ Coverage               50.45%   75.11%   +24.66%     
=======================================================
  Files                      84       84               
  Lines                   11922    11922               
=======================================================
+ Hits                     6015     8955     +2940     
+ Misses                   5907     2967     -2940     
Flag Coverage Δ
unittests 75.11% <100.00%> (+24.66%) ⬆️

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.

Copy link
Contributor Author

Copilot AI commented Feb 14, 2026

Just as a heads up, I was blocked by some firewall rules while working on your feedback. Expand below for details.

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • 127.0.0.11
    • Triggering command: REDACTED, pid is -1 (packet block)
  • api-dandi.emberarchive.org
    • Triggering command: /usr/bin/python python -m pytest dandi/tests/test_dandiarchive.py::test_parse_api_url -v (dns block)
  • api-dandi.sandbox.emberarchive.org
    • Triggering command: /usr/bin/python python -m pytest dandi/tests/test_dandiarchive.py::test_parse_api_url -v (dns block)
  • api.dandiarchive.org
    • Triggering command: /usr/bin/python python -m pytest dandi/tests/test_dandiarchive.py::test_parse_api_url -v (dns block)
  • api.lincbrain.org
    • Triggering command: /usr/bin/python python -m pytest dandi/tests/test_dandiarchive.py::test_parse_api_url -v (dns block)
  • api.sandbox.dandiarchive.org
    • Triggering command: /usr/bin/python python -m pytest dandi/tests/test_dandiarchive.py::test_parse_api_url -v (dns block)
  • dandiarchive.org
    • Triggering command: /usr/bin/python python -m pytest dandi/tests/test_dandiarchive.py::test_parse_api_url -v (dns block)
  • dl.min.io
    • Triggering command: /usr/bin/minio minio server /data bash --no�� --noprofile git cal/bin/bash get pi git bash --no�� --noprofile git al/local/bin/git get --global al/bin/git bash (dns block)
  • sandbox.dandiarchive.org
    • Triggering command: /usr/bin/python python -m pytest dandi/tests/test_dandiarchive.py::test_parse_api_url -v (dns block)

If you need me to access, download, or install something from one of these locations, you can either:

Copilot AI changed the title [WIP] Enhance API client error messages Update test assertions for enhanced API error messages Feb 14, 2026
Copilot AI requested a review from CodyCBakerPhD February 14, 2026 04:50
@CodyCBakerPhD CodyCBakerPhD merged commit 4b22672 into enh-lad-errors-api Feb 14, 2026
34 of 35 checks passed
@CodyCBakerPhD CodyCBakerPhD deleted the copilot/sub-pr-1791-again branch February 14, 2026 05:40
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