Skip to content

Commit

Permalink
chore: update types
Browse files Browse the repository at this point in the history
Signed-off-by: Frank Kong <[email protected]>
  • Loading branch information
Zaperex committed May 10, 2024
1 parent 1ca413d commit 363b28e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
3 changes: 1 addition & 2 deletions plugins/audit-log-common/src/DefaultAuditLogger.ts
Original file line number Diff line number Diff line change
Expand Up @@ -82,11 +82,10 @@ export class DefaultAuditLogger implements AuditLogger {
};

if (status === 'failed') {
const errs = options.errors as ErrorLike[];
return {
...auditLogCommonDetails,
status,
errors: errs.map(err => {
errors: options.errors.map(err => {
return {
name: err.name,
message: err.message,
Expand Down
2 changes: 1 addition & 1 deletion plugins/audit-log-common/src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ export type AuditLogDetailsOptions = {
metadata?: JsonValue;
response?: AuditResponse;
} & AuditActorOptions &
({ status: 'succeeded' } | { status: 'failed'; errors: unknown[] });
({ status: 'succeeded' } | { status: 'failed'; errors: ErrorLike[] });

export type AuditLogOptions = {
eventName: string;
Expand Down

0 comments on commit 363b28e

Please sign in to comment.