I'm using the src/idl/clearing_house.json data to parse returned errors, and have a local type declaration for the IDL structure. Might be handy to add to the SDK. Here is my partial (only using the errors portion):
export type ClearingHouseIdl = {
errors: ClearingHouseIdlErrors[];
};
export type ClearingHouseIdlErrors = {
code: number;
message: string;
name: string;
};