Dont try to fetch 4bytes again in case of network errors
This commit is contained in:
parent
d09fe7a023
commit
682549fa4c
@ -53,6 +53,7 @@ const fourBytesFetcher =
|
||||
const fourBytes = key.slice(2);
|
||||
const signatureURL = fourBytesURL(assetsURLPrefix, fourBytes);
|
||||
|
||||
try {
|
||||
const res = await fetch(signatureURL);
|
||||
if (!res.ok) {
|
||||
console.warn(`Signature does not exist in 4bytes DB: ${fourBytes}`);
|
||||
@ -70,6 +71,11 @@ const fourBytesFetcher =
|
||||
signature: sig,
|
||||
};
|
||||
return entry;
|
||||
} catch (err) {
|
||||
// Network error or something wrong with URL config;
|
||||
// silence and don't try it again
|
||||
return null;
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user