Skip to content

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

@jmonster

Description

@jmonster

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);

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions