Skip to content

Conversation

@kmcginnes
Copy link
Collaborator

@kmcginnes kmcginnes commented Apr 25, 2025

Description

If an error response contains HTML content it should be ignored, since there is no consistent way to get useful content out of the HTML.

  • Fix dialog width and other styles for error details

Validation

  • Verified using html response stubbed out locally on gremlin endpoint
  • Added tests

Related Issues

Check List

  • I confirm that my contribution is made under the terms of the Apache 2.0
    license.
  • I have run pnpm checks to ensure code compiles and meets standards.
  • I have run pnpm test to check if all tests are passing.
  • I have covered new added functionality with unit tests if necessary.
  • I have added an entry in the Changelog.md.

@kmcginnes kmcginnes marked this pull request as ready for review April 25, 2025 20:22
@andreachild
Copy link
Contributor

LGTM just had a small comment

@codecov
Copy link

codecov bot commented Apr 25, 2025

Codecov Report

Attention: Patch coverage is 75.00000% with 3 lines in your changes missing coverage. Please review.

Project coverage is 30.85%. Comparing base (46372f5) to head (d4a0b06).
Report is 56 commits behind head on main.

Files with missing lines Patch % Lines
packages/graph-explorer/src/components/Dialog.tsx 0.00% 2 Missing ⚠️
...aph-explorer/src/connector/fetchDatabaseRequest.ts 90.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #905      +/-   ##
==========================================
+ Coverage   20.96%   30.85%   +9.89%     
==========================================
  Files         523      534      +11     
  Lines       22442    23823    +1381     
  Branches     1198     1423     +225     
==========================================
+ Hits         4704     7350    +2646     
+ Misses      17494    16346    -1148     
+ Partials      244      127     -117     
Flag Coverage Δ
unittests 30.85% <75.00%> (+9.89%) ⬆️

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.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

(!contentType.includes("application/json") &&
!contentType.includes("text/plain"))
) {
return undefined;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: is the error logged anywhere else? If not could use a log here that it was an unexpected type.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fair question, which is leading me to change some stuff. So I'm going to hold this PR for after the release.

@kmcginnes kmcginnes force-pushed the fix-error-formatting branch from d4a0b06 to 033dbe6 Compare April 28, 2025 15:48
@kmcginnes kmcginnes marked this pull request as draft August 26, 2025 18:06
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.

Bad formatting of error details when HTML is returned

2 participants