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

Add internal error payload models #512

Merged
merged 1 commit into from
Mar 8, 2024
Merged

Conversation

fractalwrench
Copy link
Contributor

Goal

Adds model classes for the new internal error payload. This is mostly generated via OpenAPI but tweaked manually for style reasons.

Testing

Added unit test to confirm new model can be constructed from old one.

Copy link

codecov bot commented Mar 7, 2024

Codecov Report

Attention: Patch coverage is 89.74359% with 4 lines in your changes are missing coverage. Please review.

Project coverage is 79.44%. Comparing base (d08aac0) to head (11be2c2).

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #512      +/-   ##
==========================================
+ Coverage   79.37%   79.44%   +0.07%     
==========================================
  Files         392      395       +3     
  Lines       10771    10795      +24     
  Branches     1597     1599       +2     
==========================================
+ Hits         8549     8576      +27     
+ Misses       1579     1575       -4     
- Partials      643      644       +1     
Files Coverage Δ
.../embracesdk/internal/payload/ExceptionErrorInfo.kt 100.00% <100.00%> (ø)
...droid/embracesdk/internal/payload/ExceptionInfo.kt 100.00% <100.00%> (ø)
...droid/embracesdk/internal/payload/InternalError.kt 100.00% <100.00%> (ø)
...roid/embracesdk/internal/payload/SessionPayload.kt 100.00% <100.00%> (ø)
.../embracesdk/logging/EmbraceInternalErrorService.kt 90.19% <100.00%> (ø)
...ava/io/embrace/android/embracesdk/payload/Crash.kt 100.00% <100.00%> (ø)
...android/embracesdk/payload/LegacyExceptionError.kt 95.23% <100.00%> (ø)
...a/io/embrace/android/embracesdk/payload/Session.kt 100.00% <100.00%> (ø)
...roid/embracesdk/payload/extensions/CrashFactory.kt 78.57% <100.00%> (ø)
.../android/embracesdk/payload/LegacyExceptionInfo.kt 47.61% <75.00%> (ø)
... and 1 more

... and 3 files with indirect coverage changes

Base automatically changed from move-envelope to master March 7, 2024 09:27
@fractalwrench fractalwrench force-pushed the add-internal-err branch 2 times, most recently from 12ac06a to fde4e61 Compare March 7, 2024 15:36
@@ -35,6 +35,10 @@ internal class ExceptionInfo internal constructor(
@Json(name = "length")
val originalLength: Int? = lines.size.takeIf { it > STACK_FRAME_LIMIT }

fun toNewPayload(): io.embrace.android.embracesdk.internal.payload.ExceptionInfo {
Copy link
Contributor

@priettt priettt Mar 7, 2024

Choose a reason for hiding this comment

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

nit: is the full import needed? if it's because there's two ExceptionInfo classes, should we rename one of them?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yeah it's needed to disambiguate right now. @priettt how about adding a prefix, like LegacyExceptionInfo, to affected classes? I'll roll that out across the other PRs tomorrow if you're happy with the approach

@fractalwrench fractalwrench merged commit a7b954f into master Mar 8, 2024
4 checks passed
@fractalwrench fractalwrench deleted the add-internal-err branch March 8, 2024 08:55
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