mirror of
https://github.com/simstudioai/sim.git
synced 2026-02-16 01:15:26 -05:00
* feat(logs): enhanced logging system with cleanup and theme fixes - Implement enhanced logging cleanup with S3 archival and retention policies - Fix error propagation in trace spans for manual executions - Add theme-aware styling for frozen canvas modal - Integrate enhanced logging system across all execution pathways - Add comprehensive trace span processing and iteration navigation - Fix boolean parameter types in enhanced logs API * add warning for old logs * fix lint * added cost for streaming outputs * fix overflow issue * fix lint * fix selection on closing sidebar * tooltips z index increase --------- Co-authored-by: Vikhyath Mondreti <vikhyathmondreti@vikhyaths-air.lan> Co-authored-by: Waleed Latif <walif6@gmail.com>
24 lines
687 B
TypeScript
24 lines
687 B
TypeScript
/**
|
|
* Custom error classes for tokenization functionality
|
|
*/
|
|
|
|
export class TokenizationError extends Error {
|
|
public readonly code: 'INVALID_PROVIDER' | 'MISSING_TEXT' | 'CALCULATION_FAILED' | 'INVALID_MODEL'
|
|
public readonly details?: Record<string, unknown>
|
|
|
|
constructor(message: string, code: TokenizationError['code'], details?: Record<string, unknown>) {
|
|
super(message)
|
|
this.name = 'TokenizationError'
|
|
this.code = code
|
|
this.details = details
|
|
}
|
|
}
|
|
|
|
export function createTokenizationError(
|
|
code: TokenizationError['code'],
|
|
message: string,
|
|
details?: Record<string, unknown>
|
|
): TokenizationError {
|
|
return new TokenizationError(message, code, details)
|
|
}
|