Rules Hub
Coding Rules Library
← Back to all rules
Rule priority, scope & exceptions
Use this to align rules with the senior-level structure (P0/P1/P2, scope, exceptions/tradeoffs).
backend ruleP1universalStack: node
asyncside-effectsresiliencefire-and-forget
Treat non-critical side effects (e.g. image deletion) as fire-and-forget
A side effect whose failure must not block the main operation should be invoked fire-and-forget, not awaited inline in the critical path.
PR: vinify-backend · org-mining-deep-2026-06Created: Jun 17, 2026
Bad example
Old codetypescript
| 1 | await this.repo.update(...); |
| 2 | await this.s3.deleteImage(url); // failure rolls back the request |
Explanation (EN)
Objašnjenje (HR)
Good example
New codetypescript
| 1 | await this.repo.update(...); |
| 2 | void this.s3.deleteImage(url).catch(err => this.logger.error(err)); |
Explanation (EN)
Objašnjenje (HR)