Custom response with bearerAuth

I would like to return a custom response when verifyToken is false.
const authMiddleware = bearerAuth({
  verifyToken: async (token, c) => {
    const data = await c.env.AUTH.get(token);
    if (!data) {
      return false; // response: Plz provide valid apiKey
    }
    if (data.count > data.quota) {
        return false; // response: Quota exceeded
    }
  return true;
  },
});

Is it possible?
Was this page helpful?