ModelError.ts — typescript-sdk Source File
Architecture documentation for ModelError.ts, a typescript file in the typescript-sdk codebase. 6 imports, 0 dependents.
Entity Profile
Dependency Diagram
graph LR caeb26d6_13ae_b344_bfa4_9dfde784482d["ModelError.ts"] 41b6b5c2_aa5b_90b9_c373_84e0a8cd9918["runtime.ts"] caeb26d6_13ae_b344_bfa4_9dfde784482d --> 41b6b5c2_aa5b_90b9_c373_84e0a8cd9918 11568abc_c5bd_8b5d_1ce1_6d595e449b9c["mapValues"] caeb26d6_13ae_b344_bfa4_9dfde784482d --> 11568abc_c5bd_8b5d_1ce1_6d595e449b9c 6ffd4c80_2648_09d6_c6c5_f13df61e1543["ErrorDetailsInner.ts"] caeb26d6_13ae_b344_bfa4_9dfde784482d --> 6ffd4c80_2648_09d6_c6c5_f13df61e1543 38fbed63_effb_6d45_e93e_75bbae7bd295["ErrorDetailsInnerFromJSON"] caeb26d6_13ae_b344_bfa4_9dfde784482d --> 38fbed63_effb_6d45_e93e_75bbae7bd295 4d750ca7_f72e_b7bc_36af_1f87b6c4aba4["ErrorDetailsInnerFromJSONTyped"] caeb26d6_13ae_b344_bfa4_9dfde784482d --> 4d750ca7_f72e_b7bc_36af_1f87b6c4aba4 4541874f_e894_7134_ef12_1ba01b0a9e93["ErrorDetailsInnerToJSON"] caeb26d6_13ae_b344_bfa4_9dfde784482d --> 4541874f_e894_7134_ef12_1ba01b0a9e93 style caeb26d6_13ae_b344_bfa4_9dfde784482d fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
/* tslint:disable */
/* eslint-disable */
/**
* Supermodel
* Code Graphing & Analysis API
*
* The version of the OpenAPI document: 0.9.3
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
import { mapValues } from '../runtime';
import type { ErrorDetailsInner } from './ErrorDetailsInner';
import {
ErrorDetailsInnerFromJSON,
ErrorDetailsInnerFromJSONTyped,
ErrorDetailsInnerToJSON,
} from './ErrorDetailsInner';
/**
* Standardized error payload returned by the API.
* @export
* @interface ModelError
*/
export interface ModelError {
/**
* HTTP status code associated with the error.
* @type {number}
* @memberof ModelError
*/
status: number;
/**
* Stable, machine-readable error identifier.
* @type {string}
* @memberof ModelError
*/
code: string;
/**
* Human-readable description of the error.
* @type {string}
* @memberof ModelError
*/
message: string;
/**
* ISO-8601 timestamp indicating when the error occurred.
* @type {Date}
* @memberof ModelError
*/
timestamp: Date;
/**
* Correlation identifier for tracing the failing request.
* @type {string}
* @memberof ModelError
*/
requestId?: string;
/**
* Optional list of contextual error details.
* @type {Array<ErrorDetailsInner>}
* @memberof ModelError
*/
details?: Array<ErrorDetailsInner>;
}
/**
* Check if a given object implements the ModelError interface.
*/
export function instanceOfModelError(value: object): value is ModelError {
if (!('status' in value) || value['status'] === undefined) return false;
if (!('code' in value) || value['code'] === undefined) return false;
if (!('message' in value) || value['message'] === undefined) return false;
if (!('timestamp' in value) || value['timestamp'] === undefined) return false;
return true;
}
export function ModelErrorFromJSON(json: any): ModelError {
return ModelErrorFromJSONTyped(json, false);
}
export function ModelErrorFromJSONTyped(json: any, ignoreDiscriminator: boolean): ModelError {
if (json == null) {
return json;
}
return {
'status': json['status'],
'code': json['code'],
'message': json['message'],
'timestamp': (new Date(json['timestamp'])),
'requestId': json['requestId'] == null ? undefined : json['requestId'],
'details': json['details'] == null ? undefined : ((json['details'] as Array<any>).map(ErrorDetailsInnerFromJSON)),
};
}
export function ModelErrorToJSON(value?: ModelError | null): any {
if (value == null) {
return value;
}
return {
'status': value['status'],
'code': value['code'],
'message': value['message'],
'timestamp': ((value['timestamp']).toISOString()),
'requestId': value['requestId'],
'details': value['details'] == null ? undefined : ((value['details'] as Array<any>).map(ErrorDetailsInnerToJSON)),
};
}
Domain
Subdomains
Types
Dependencies
Source
Frequently Asked Questions
What does ModelError.ts do?
ModelError.ts is a source file in the typescript-sdk codebase, written in typescript. It belongs to the CodeGraph domain, IR subdomain.
What functions are defined in ModelError.ts?
ModelError.ts defines 4 function(s): ModelErrorFromJSON, ModelErrorFromJSONTyped, ModelErrorToJSON, instanceOfModelError.
What does ModelError.ts depend on?
ModelError.ts imports 6 module(s): ErrorDetailsInner.ts, ErrorDetailsInnerFromJSON, ErrorDetailsInnerFromJSONTyped, ErrorDetailsInnerToJSON, mapValues, runtime.ts.
Where is ModelError.ts in the architecture?
ModelError.ts is located at src/models/ModelError.ts (domain: CodeGraph, subdomain: IR, directory: src/models).
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free