feat: add more error handling

This commit is contained in:
2024-06-07 23:13:30 -04:00
parent 6fd2cc4feb
commit c35c9b9e09
9 changed files with 71 additions and 66 deletions

View File

@@ -7,7 +7,7 @@ export function getAmvstrmSearchResults() {
const url = new URL(urlString);
const query = url.searchParams.get("q");
if (!query) {
if (!query || query === "a") {
return HttpResponse.json({
code: 200,
message: "success",

View File

@@ -4,7 +4,7 @@ export function getAnilistSearchResults() {
return graphql.query("Search", ({ variables: { query, page } }) => {
console.log(`Intercepting Search query with ${query} and page ${page}`);
if (!query || query === "amvstrm") {
if (!query || query === "a" || query === "amvstrm") {
return HttpResponse.json({
data: {
Page: {