Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"The script will never generate a response." ... then it generates a response #12

Open
jmonster opened this issue Jun 29, 2021 · 0 comments

Comments

@jmonster
Copy link
Contributor

As a user, everything appears to work just fine -- but when I look at my CloudFlare dashboard I'm seeing an error for all of my requests.

image

I dug in with wrangler tail and here's a subset of what I saw:

{
    "outcome": "exception",
    "scriptName": null,
    "exceptions": [{
        "name": "Error",
        "message": "The script will never generate a response.",
        "timestamp": 1624986983071
    }],
    "logs": [{
        "message": ["Found containing chunk"],
        "level": "log",
        "timestamp": 1624986981885
    }, {
        "message": ["Fetched chunk from KV"],
        "level": "log",
        "timestamp": 1624986982339
    }, {
        "message": ["Found entry in chunk"],
        "level": "log",
        "timestamp": 1624986982339
    }, {
        "message": ["Bit sets retrieved"],
        "level": "log",
        "timestamp": 1624986982339
    }, {
        "message": ["Query built"],
        "level": "log",
        "timestamp": 1624986982339
    }, {
        "message": ["Query executed"],
        "level": "log",
        "timestamp": 1624986982339
    }, {
        "message": ["Found containing chunk"],
        "level": "log",
        "timestamp": 1624986982339
    }, {
        "message": ["Found entry in chunk"],
        "level": "log",
        "timestamp": 1624986983071
    }, {
        "message": ["Documents fetched"],
        "level": "log",
        "timestamp": 1624986983071
    }],
    "eventTimestamp": 1624986981885,
    "event": {
        "request": {
            "url": "https://gifs-edgesearch.garage.workers.dev/search?c=0&t=0_text_bobby",
            "method": "GET",
        }
    }
}

Meanwhile the client (a browser) received the following (headers removed for brevity):

:status: 200
Content-Type: application/json
Content-Encoding: br
Server: cloudflare

And an idea of what the response data looked like:

{
    "total": 2709,
    "continuation": 50,
    "results": [/* omitted */]
}

and an idea of what the underlying client code looks like:

const t = 'bobby'
const q = new Edgesearch.Query();
q.add(Edgesearch.Mode.REQUIRE, `text_${t}`)
let response = await client.search(q);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant