Use logger! add shim to convert backend responses to same format (#84)
* chore(orchestrator): add @infra import alias * feat(server): add error/http/context/logger/sanitize infrastructure * refactor(core): propagate request context, structured logs, and sanitization * test/docs: update API contract assertions and contributor standards * all pages working * normalizing
This commit is contained in:
+20
-4
@@ -309,12 +309,28 @@ export interface PipelineRun {
|
||||
}
|
||||
|
||||
// API Response types
|
||||
export interface ApiResponse<T> {
|
||||
success: boolean;
|
||||
data?: T;
|
||||
error?: string;
|
||||
export interface ApiMeta {
|
||||
requestId: string;
|
||||
}
|
||||
|
||||
export interface ApiErrorPayload {
|
||||
code: string;
|
||||
message: string;
|
||||
details?: unknown;
|
||||
}
|
||||
|
||||
export type ApiResponse<T> =
|
||||
| {
|
||||
ok: true;
|
||||
data: T;
|
||||
meta?: ApiMeta;
|
||||
}
|
||||
| {
|
||||
ok: false;
|
||||
error: ApiErrorPayload;
|
||||
meta: ApiMeta;
|
||||
};
|
||||
|
||||
export interface JobsListResponse {
|
||||
jobs: Job[];
|
||||
total: number;
|
||||
|
||||
Reference in New Issue
Block a user