Skip to content

(Better-Auth) instrumented functions are not being called #22

@firatoezcan

Description

@firatoezcan

As title says, the wrapped functions are not being called.

Relevant information:

"better-auth": "^1.3.27"
import { Elysia } from "elysia";
import { auth } from "../auth";
import { authBasePath } from "../utils";

export const authorization = new Elysia({
	name: "authorization",
}).group(authBasePath, (app) =>
	app
		.onError((ctx) => {
			// TODO: Probably a better way to do this
			if (ctx.error.constructor.name === "ElysiaCustomStatusResponse") {
				return;
			}
			if (ctx.code === "NOT_FOUND" || ctx.code === "VALIDATION") return;
			console.error(ctx.error);
		})
		.mount(auth.handler)
);

Rest as in the docs, I also checked the returned auth instance and they do specify instrumented as the function name for the methods but not sure whats going on why they are not being called.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions