Skip to content

Commit

Permalink
fix: add stackKey to CrashDetails (#119)
Browse files Browse the repository at this point in the history
  • Loading branch information
bobbyg603 authored Mar 11, 2024
1 parent b6ad9a0 commit 87c25e7
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
1 change: 1 addition & 0 deletions spec/fakes/crash/crash-api-response.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ export const createFakeCrashApiResponse = () => ({
platform: 'NES',
previousCrashId: 998,
processor: 'Pentium 4',
stackKey: 'myConsoleCrasher(1337)',
stackKeyComment: 'hello world!',
stackKeyId: 117,
stackKeyDefectLabel: 'idk',
Expand Down
3 changes: 3 additions & 0 deletions src/crash/crash-details/crash-details.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ export interface CrashDetails {
platform: string;
previousCrashId: number;
processor: string;
stackKey: string;
stackKeyComment: string;
stackKeyId: number;
stackKeyDefectId: number;
Expand Down Expand Up @@ -79,6 +80,7 @@ export function createCrashDetails(options: CrashDetailsRawResponse): CrashDetai
const ipAddress = defaultToEmptyString(options.ipAddress, 'options.ipAddress');
const platform = defaultToEmptyString(options.platform, 'options.platform');
const processor = defaultToEmptyString(options.processor, 'options.processor');
const stackKey = defaultToEmptyString(options.stackKey, 'options.stackKey');
const stackKeyComment = defaultToEmptyString(options.stackKeyComment,'options.stackKeyComment');
const stackKeyDefectLabel = defaultToEmptyString(options.stackKeyDefectLabel, 'options.stackKeyDefectLabel');
const stackKeyDefectUrl = defaultToEmptyString(options.stackKeyDefectUrl, 'options.stackKeyDefectUrl');
Expand Down Expand Up @@ -114,6 +116,7 @@ export function createCrashDetails(options: CrashDetailsRawResponse): CrashDetai
ipAddress,
platform,
processor,
stackKey,
stackKeyComment,
stackKeyDefectLabel,
stackKeyDefectUrl,
Expand Down

0 comments on commit 87c25e7

Please sign in to comment.