Skip to content

Commit 4624236

Browse files
committed
Added simple error interface
1 parent 4cb5b4d commit 4624236

File tree

2 files changed

+13
-2
lines changed

2 files changed

+13
-2
lines changed

packages/core/src/models/Event.ts

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
1-
import { ErrorInfo } from "./data/ErrorInfo.js";
1+
import {
2+
ErrorInfo,
3+
SimpleError
4+
} from "./data/ErrorInfo.js";
25
import { EnvironmentInfo } from "./data/EnvironmentInfo.js";
36
import { RequestInfo } from "./data/RequestInfo.js";
47
import { UserInfo } from "./data/UserInfo.js";
@@ -44,7 +47,7 @@ export const enum KnownEventDataKeys {
4447

4548
interface IData extends Record<string, any> {
4649
"@error"?: ErrorInfo;
47-
"@simple_error"?: any; // TODO: Need a model for simple error
50+
"@simple_error"?: SimpleError;
4851
"@request"?: RequestInfo;
4952
"@environment"?: EnvironmentInfo;
5053
"@user"?: UserInfo;

packages/core/src/models/data/ErrorInfo.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,13 @@
11
import { ModuleInfo } from "./ModuleInfo.js";
22

3+
export interface SimpleError {
4+
message?: string;
5+
type?: string;
6+
stack_trace?: string;
7+
data?: any;
8+
inner?: SimpleError;
9+
}
10+
311
export interface InnerErrorInfo {
412
message?: string;
513
type?: string;

0 commit comments

Comments
 (0)