diff options
author | 2023-06-26 10:51:06 +0200 | |
---|---|---|
committer | 2023-06-26 16:51:06 +0800 | |
commit | 4e02a59e422c54ca7b8cbcb2be9eab5efe2f2b74 (patch) | |
tree | c5d71c3f9d7503a7252b01adb27069ac02632d56 /packages/integrations/markdoc/src/utils.ts | |
parent | 39a24f111d06bd72cd64ff70f7af04fdc807b008 (diff) | |
download | astro-4e02a59e422c54ca7b8cbcb2be9eab5efe2f2b74.tar.gz astro-4e02a59e422c54ca7b8cbcb2be9eab5efe2f2b74.tar.zst astro-4e02a59e422c54ca7b8cbcb2be9eab5efe2f2b74.zip |
fix(errors): Deprecate error codes (#7347)
Co-authored-by: bluwy <bjornlu.dev@gmail.com>
Diffstat (limited to 'packages/integrations/markdoc/src/utils.ts')
-rw-r--r-- | packages/integrations/markdoc/src/utils.ts | 15 |
1 files changed, 1 insertions, 14 deletions
diff --git a/packages/integrations/markdoc/src/utils.ts b/packages/integrations/markdoc/src/utils.ts index 8dd4075db..002d2238f 100644 --- a/packages/integrations/markdoc/src/utils.ts +++ b/packages/integrations/markdoc/src/utils.ts @@ -29,7 +29,6 @@ export function parseFrontmatter(fileContents: string, filePath: string) { * @see 'astro/src/core/errors/errors.ts' */ export class MarkdocError extends Error { - public errorCode: number; public loc: ErrorLocation | undefined; public title: string | undefined; public hint: string | undefined; @@ -40,20 +39,8 @@ export class MarkdocError extends Error { constructor(props: ErrorProperties, ...params: any) { super(...params); - const { - // Use default code for unknown errors in Astro core - // We don't have a best practice for integration error codes yet - code = 99999, - name, - title = 'MarkdocError', - message, - stack, - location, - hint, - frame, - } = props; + const { name, title = 'MarkdocError', message, stack, location, hint, frame } = props; - this.errorCode = code; this.title = title; if (message) this.message = message; // Only set this if we actually have a stack passed, otherwise uses Error's |