This commit introduces stricter type validation across the application to reject objects with unexpected properties, enhancing the robustness and predictability of data handling. Changes include: - Implement a common utility to validate object types. - Refactor across various parsers and data handlers to utilize the new validations. - Update error messages for better clarity and troubleshooting.
5 lines
250 B
TypeScript
5 lines
250 B
TypeScript
import type { ErrorWithContextWrapper } from '@/application/Parser/Common/ContextualError';
|
|
|
|
export const errorWithContextWrapperStub
|
|
: ErrorWithContextWrapper = (error, message) => new Error(`[stubbed error wrapper] ${error.message} + ${message}`);
|