Skip to content

Commit

Permalink
refactor: remove metadata property from the parser error
Browse files Browse the repository at this point in the history
The same will be moved to the Youch implementation for the HTML output,
since the metadata is specific to the HTML output
  • Loading branch information
thetutlage committed Nov 11, 2024
1 parent fa9e936 commit f54d37b
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 6 deletions.
3 changes: 1 addition & 2 deletions src/parser.ts
Original file line number Diff line number Diff line change
Expand Up @@ -287,12 +287,11 @@ export class ErrorParser {

/**
* Creating a parsed error object with all the error properties
* and the metadata + frames
* and the stack frames
*/
const parsedError = {
message: error.message,
name: error.name,
metadata: [],
frames: await this.#enhanceFrames(esFrames),
hint: 'hint' in error ? String(error.hint) : 'help' in error ? String(error.help) : undefined,
code: 'code' in error ? String(error.code) : undefined,
Expand Down
4 changes: 0 additions & 4 deletions src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,6 @@
* file that was distributed with this source code.
*/

export type MetadataRow = Record<string, string>
export type MetadataGroup = Record<string, MetadataRow[]>

/**
* Representation of a source file chunk
*/
Expand All @@ -25,7 +22,6 @@ export interface ParsedError {
message: string
name: string
frames: StackFrame[]
metadata: MetadataGroup[]
/**
* Referenced to the raw error property. The value will always
* be an Error object even if the thrown value was not an
Expand Down

0 comments on commit f54d37b

Please sign in to comment.