mirror of
https://github.com/AutoMaker-Org/automaker.git
synced 2026-02-03 21:03:08 +00:00
refactoring the api endpoints to be separate files to reduce context usage
This commit is contained in:
14
apps/server/src/routes/health/common.ts
Normal file
14
apps/server/src/routes/health/common.ts
Normal file
@@ -0,0 +1,14 @@
|
||||
/**
|
||||
* Common utilities for health routes
|
||||
*/
|
||||
|
||||
import { createLogger } from "../../lib/logger.js";
|
||||
|
||||
const logger = createLogger("Health");
|
||||
|
||||
/**
|
||||
* Get error message from error object
|
||||
*/
|
||||
export function getErrorMessage(error: unknown): string {
|
||||
return error instanceof Error ? error.message : "Unknown error";
|
||||
}
|
||||
Reference in New Issue
Block a user