From 17e508104723671fd58e496da5c764540d4e0a82 Mon Sep 17 00:00:00 2001 From: delfino Date: Thu, 27 Feb 2025 17:30:01 +0000 Subject: [PATCH] d2js: updating custom font error code --- d2js/d2wasm/functions.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/d2js/d2wasm/functions.go b/d2js/d2wasm/functions.go index 4df3882c2..dfec5f600 100644 --- a/d2js/d2wasm/functions.go +++ b/d2js/d2wasm/functions.go @@ -212,7 +212,7 @@ func Compile(args []js.Value) (interface{}, error) { if fontRegular != nil || fontItalic != nil || fontBold != nil || fontSemibold != nil { fontFamily, err := d2fonts.AddFontFamily("custom", fontRegular, fontItalic, fontBold, fontSemibold) if err != nil { - return nil, &WASMError{Message: fmt.Sprintf("custom fonts could not be initialized: %s", err.Error()), Code: 500} + return nil, &WASMError{Message: fmt.Sprintf("custom fonts could not be initialized: %s", err.Error()), Code: 400} } compileOpts.FontFamily = fontFamily }