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

[#noissue] Handle html error response #11197

Merged

Conversation

binDongKim
Copy link
Contributor

No description provided.

Copy link
Contributor

@BillionaireDY BillionaireDY left a comment

Choose a reason for hiding this comment

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

Error occurs src/components/ApiCheck/ApiStatus.tsx(39,28): error TS2322: Type 'ErrorResponse' is not assignable to type 'ErrorResponse & { url: string; }'.

How about create new type? For example, ErrorDialogResponse = ErrorResponse & { url?: string }

<div className="flex items-center gap-1">
<a
className="text-sm font-semibold text-primary hover:underline"
href={error?.url}
Copy link
Contributor

Choose a reason for hiding this comment

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

if error type is error: ErrorResponse & { url: string };, optional type is not necessary

or correct error type to error: ErrorResponse & { url?: string };

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Added new type ErrorDetailResponse and corrected error type.

Copy link

codecov bot commented Jul 1, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 37.00%. Comparing base (73c5a98) to head (dffc7f5).
Report is 11 commits behind head on master.

Additional details and impacted files
@@             Coverage Diff              @@
##             master   #11197      +/-   ##
============================================
- Coverage     37.02%   37.00%   -0.03%     
+ Complexity    12047    12046       -1     
============================================
  Files          3974     3979       +5     
  Lines         97808    97869      +61     
  Branches      10410    10415       +5     
============================================
  Hits          36212    36212              
- Misses        58617    58682      +65     
+ Partials       2979     2975       -4     

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

@binDongKim binDongKim merged commit ae66fc2 into pinpoint-apm:master Jul 2, 2024
2 of 3 checks passed
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.

None yet

2 participants