feat(backend): add LocationService

- Add LocationService to manage LocationSource per user
- Add UserNotFoundError for generic user-related errors
- updateUserLocation throws if source not initialized

Co-authored-by: Ona <no-reply@ona.com>
This commit is contained in:
2026-01-25 19:38:52 +00:00
parent da2c1b9ee7
commit faad9e9736
3 changed files with 174 additions and 0 deletions

View File

@@ -0,0 +1,8 @@
export class UserNotFoundError extends Error {
constructor(
public readonly userId: string,
message?: string,
) {
super(message ? `${message}: user not found: ${userId}` : `User not found: ${userId}`)
}
}