Skip to content

Commit

Permalink
🔥 Clear remaining code of network error removal (#1367)
Browse files Browse the repository at this point in the history
* 🔥 Remove error resource mapping
  • Loading branch information
amortemousque authored Mar 2, 2022
1 parent ae20574 commit 1cc42c1
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 25 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@ describe('error collection', () => {
error: {
id: jasmine.any(String),
message: 'foo',
resource: undefined,
source: ErrorSource.CUSTOM,
stack: jasmine.stringMatching('Error: foo'),
handling_stack: 'Error: handling foo',
Expand Down Expand Up @@ -125,12 +124,7 @@ describe('error collection', () => {
lifeCycle.notify(LifeCycleEventType.RAW_ERROR_COLLECTED, {
error: {
message: 'hello',
resource: {
method: 'GET',
statusCode: 500,
url: 'url',
},
source: ErrorSource.NETWORK,
source: ErrorSource.CUSTOM,
stack: 'bar',
startClocks: { relative: 1234 as RelativeTime, timeStamp: 123456789 as TimeStamp },
type: 'foo',
Expand All @@ -144,12 +138,7 @@ describe('error collection', () => {
error: {
id: jasmine.any(String),
message: 'hello',
resource: {
method: 'GET',
status_code: 500,
url: 'url',
},
source: ErrorSource.NETWORK,
source: ErrorSource.CUSTOM,
stack: 'bar',
handling_stack: undefined,
type: 'foo',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -85,13 +85,6 @@ function processError(
error: {
id: generateUUID(),
message: error.message,
resource: error.resource
? {
method: error.resource.method,
status_code: error.resource.statusCode,
url: error.resource.url,
}
: undefined,
source: error.source,
stack: error.stack,
handling_stack: error.handlingStack,
Expand Down
5 changes: 0 additions & 5 deletions packages/rum-core/src/rawRumEvent.types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,11 +50,6 @@ export interface RawRumErrorEvent {
date: TimeStamp
type: RumEventType.ERROR
error: {
resource?: {
url: string
status_code: number
method: string
}
id: string
type?: string
stack?: string
Expand Down

0 comments on commit 1cc42c1

Please sign in to comment.