🌿 Collaborative wiki on ATProto lichen.wiki
atproto
14
fork

Configure Feed

Select the types of activity you want to include in your feed.

Add more error warnings

juprodh 76caef0d 3e5e6f0b

+12 -10
+3 -2
src/atproto/routes.ts
··· 2 2 import { OAUTH_SCOPE } from "../lib/constants.ts"; 3 3 import { escapeHtml } from "../lib/html.ts"; 4 4 import { fmt, resolveLocale, t } from "../lib/i18n/index.ts"; 5 + import { LIMITS } from "../lib/limits.ts"; 5 6 import { htmlResponse } from "../lib/response.ts"; 6 7 import { loginPage } from "../views/login.ts"; 7 8 import { getDevAccounts, getDevPdsUrl, getHandleResolverUrl } from "./env.ts"; ··· 121 122 ["Location", returnToUrl], 122 123 [ 123 124 "Set-Cookie", 124 - `did=${encodeURIComponent(did)}; Path=/; HttpOnly; SameSite=Lax; Secure; Max-Age=2592000`, 125 + `did=${encodeURIComponent(did)}; Path=/; HttpOnly; SameSite=Lax; Secure; Max-Age=${LIMITS.sessionMaxAgeSecs}`, 125 126 ], 126 127 [ 127 128 "Set-Cookie", ··· 173 174 ["Location", returnToUrl], 174 175 [ 175 176 "Set-Cookie", 176 - `did=${encodeURIComponent(account.did)}; Path=/; HttpOnly; SameSite=Lax; Secure; Max-Age=2592000`, 177 + `did=${encodeURIComponent(account.did)}; Path=/; HttpOnly; SameSite=Lax; Secure; Max-Age=${LIMITS.sessionMaxAgeSecs}`, 177 178 ], 178 179 [ 179 180 "Set-Cookie",
+1
src/lib/limits.ts
··· 46 46 }, 47 47 snippetRadius: 60, 48 48 profileCacheHours: 24, 49 + sessionMaxAgeSecs: 604800, // 7 days 49 50 } as const;
+2 -2
src/lib/orchestrators/membership.ts
··· 128 128 COLLECTIONS.membership, 129 129 parsed.rkey, 130 130 ); 131 - } catch { 132 - // ignore -- old record stays on PDS but DB is authoritative 131 + } catch (err) { 132 + console.warn("Failed to delete old membership record from PDS:", err); 133 133 } 134 134 } 135 135
+2 -2
src/lib/orchestrators/note.ts
··· 270 270 if (parsed) { 271 271 try { 272 272 await deleteRecord(agent, parsed.did, COLLECTIONS.note, parsed.rkey); 273 - } catch { 274 - // Orphaned PDS records are acceptable on deletion 273 + } catch (err) { 274 + console.warn("Failed to delete note record from PDS:", err); 275 275 } 276 276 } 277 277 }
+4 -4
src/lib/orchestrators/wiki.ts
··· 278 278 COLLECTIONS.wiki, 279 279 wikiParsed.rkey, 280 280 ); 281 - } catch { 282 - // Orphaned PDS records are acceptable on deletion 281 + } catch (err) { 282 + console.warn("Failed to delete wiki record from PDS:", err); 283 283 } 284 284 } 285 285 ··· 294 294 COLLECTIONS.membership, 295 295 parsed.rkey, 296 296 ); 297 - } catch { 298 - // Orphaned PDS records are acceptable on deletion 297 + } catch (err) { 298 + console.warn("Failed to delete membership record from PDS:", err); 299 299 } 300 300 } 301 301 }