Skip to content
This repository was archived by the owner on Dec 8, 2023. It is now read-only.
This repository was archived by the owner on Dec 8, 2023. It is now read-only.

Pattern to find uncaught HTTP requests #9

@morgante

Description

@morgante

For safety, you might want to always catch HTTP requests in a try/catch.

For example:

// Match this
await request("/bar")

// Don't match this
try {
  await request("/foo");
} catch { }

One hitch is we also would want to consider traversing to the usage of a function.

For example, this should not match:

async function doRequest() {
  return request("/bar");
}

export function main() {
  try {
    await doRequest();
  } catch { }
}

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