We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 099f104 commit 62e5d87Copy full SHA for 62e5d87
src/core/grade.ts
@@ -109,12 +109,18 @@ export async function website(url: string): Promise<Result> {
109
try {
110
record = await api.gradeWebsite(host)
111
record.safe = await record.isSafe()
112
+ store.set(cacheKey, record.toString())
113
} catch (error) {
114
record = new Result()
115
record.score = 60
116
record.safe = true
117
+ // When there is no record on cloudopt.net yet
118
+ if (error.error === 404) {
119
+ record.host = 'UNKNOWN'
120
+ record.type = 'UNKNOWN'
121
122
+ }
123
}
- store.set(cacheKey, record.toString())
124
125
126
return record
0 commit comments