<p dir="auto">In <code class="notranslate">Deno 1.10.1</code> returning an error from an Op causes an error in Deno.</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="thread '&lt;unnamed&gt;' panicked at 'Error '`my_error` err: Generic(&quot;Some error.&quot;)' contains boxed error of unknown type:
  CustomError { class: &quot;Error&quot;, message: &quot;`my_error` err: Generic(\&quot;Some error.\&quot;)&quot; }', cli\errors.rs:35:7"><pre class="notranslate"><code class="notranslate">thread '&lt;unnamed&gt;' panicked at 'Error '`my_error` err: Generic("Some error.")' contains boxed error of unknown type:
  CustomError { class: "Error", message: "`my_error` err: Generic(\"Some error.\")" }', cli\errors.rs:35:7
</code></pre></div>
<p dir="auto">This is fixable by manually configuring the error resolving callback as:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="fn op_name(
                state: &amp;mut deno_core::OpState,
                args: (),
                _zero_copy: Option&lt;deno_core::ZeroCopyBuf&gt;,
            )
......
state.get_error_class_fn = &amp;my_error_class_name"><pre class="notranslate"><code class="notranslate">fn op_name(
                state: &amp;mut deno_core::OpState,
                args: (),
                _zero_copy: Option&lt;deno_core::ZeroCopyBuf&gt;,
            )
......
state.get_error_class_fn = &amp;my_error_class_name
</code></pre></div>
<p dir="auto">Expecting that the error class resolving callback should be set by default.</p>
<p dir="auto">Hi, from what I read the issue with OAK is supposed to be fixed. I download the latest version or Deno (1.6.3) and I tried to compile my app again.</p>
<p dir="auto">Now the "There is no middleware to process requests" is gone, seems to be fixed. But now I've got this error.</p>
<p dir="auto">"<br>
error: ReferenceError: DenoStdInternalError is not defined<br>
at assert2 (file://$deno$/bundle.js:7476:9)<br>
at getLogger (file://$deno$/bundle.js:7601:9)<br>
at file://$deno$/bundle.js:7614:16<br>
"</p>
<p dir="auto">App is working fine from deno console. the getLogger function is a function from <a href="https://deno.land/std@0.83.0/log" rel="nofollow">https://deno.land/std@0.83.0/log</a></p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="function getLogger(name3) {
    if (!name3) {
        const d = state1.loggers.get(&quot;default&quot;);
        assert2(d != null, `&quot;default&quot; logger must be set for getting logger without name`);
        return d;
    }
    const result = state1.loggers.get(name3);
    if (!result) {
        const logger = new Logger(name3, &quot;NOTSET&quot;, {
            handlers: []
        });
        state1.loggers.set(name3, logger);
        return logger;
    }
    return result;
}
const logger = getLogger();"><pre class="notranslate"><code class="notranslate">function getLogger(name3) {
    if (!name3) {
        const d = state1.loggers.get("default");
        assert2(d != null, `"default" logger must be set for getting logger without name`);
        return d;
    }
    const result = state1.loggers.get(name3);
    if (!result) {
        const logger = new Logger(name3, "NOTSET", {
            handlers: []
        });
        state1.loggers.set(name3, logger);
        return logger;
    }
    return result;
}
const logger = getLogger();
</code></pre></div>