ramensoftware/windhawk · error
INTERNAL
INTERNAL
Error message
e instanceof Error ? e.message : String(e)
What it means
Generic internal catch-all in _installedModProfileFields (windhawk-vscode extension). Any exception thrown while computing a mod's profile fields (latest version, user rating) is reported via reportException and converted to an error object with code INTERNAL carrying the exception's message.
Solutions
- Read the message string in the error object and reportException output to find the underlying exception.
- Check network connectivity / API availability for the latest-version or rating endpoints.
- Add targeted error handling for the failing sub-call instead of relying on the INTERNAL catch-all.
Defensive patterns
Strategy: try-catch
Validate before calling
if (!navigator.onLine) {
console.warn('Offline: mod profile fields may be unavailable');
} Type guard
function toErrorMessage(e: unknown): string {
return e instanceof Error ? e.message : String(e);
} Try / catch
try {
const fields = await getInstalledModProfileFields(modId);
if (fields.error) {
console.warn(`Profile fields unavailable (${fields.error.code}): ${fields.error.message}`);
return { latestVersion: null, userRating: 0 };
}
} catch (e) {
console.error(toErrorMessage(e));
} Prevention
- Check network/API availability before fetching profile fields and degrade gracefully.
- Log the raw exception (reportException output) so INTERNAL messages are diagnosable.
- Pin/wrap remote calls so transient HTTP failures become typed errors rather than reaching the INTERNAL catch-all.
When it happens
Trigger: Any unexpected exception in _installedModProfileFields — e.g. network/HTTP failure while fetching latest version or user rating, or malformed response data — inside the try block.
Common situations: Offline or flaky network when resolving the latest version; API changes upstream; unhandled promise rejections from helpers used by the profile-fields routine.
Understand the failure class
Background: "API request failed": what wrapped HTTP errors from external APIs mean and how to find the real cause — this error's family across 29 libraries.
Related errors
AI-assisted analysis of ramensoftware/windhawk@61d99ed8e1 (2026-09-12).
Data as JSON: /api/errors/da7c7a3ad52cf332.
Report an issue: GitHub.
Appendix: source
Thrown at src/windhawk-vscode/src/extension.ts:544
modId: string
): Promise<InstalledModProfileFields & { error?: WireError }> {
try {
const entry = await this._utils.core.getInstalledModDetails({
modId,
language: this._language,
checkForUpdates: this._checkForUpdates,
});
return {
latestVersion: entry.latestVersion,
userRating: entry.userRating
};
} catch (e) {
reportException(e);
return {
latestVersion: null,
userRating: 0,
error: {
code: 'INTERNAL',
message: e instanceof Error ? e.message : String(e)
}
};
}
}
private readonly _handleMessageMap: Record<string, (message: any) => void | Promise<void>> = {
getInitialAppSettings: async message => {
let appUISettings: Partial<AppUISettings> = {};
try {
const appSettings = await this._utils.core.getAppSettings();
this._language = appSettings.language;
this._checkForUpdates = !appSettings.disableUpdateCheck;
this._alwaysCompileModsLocally = appSettings.alwaysCompileModsLocally;
appUISettings = await this._getAppUISettings(appSettings);
} catch (e) {
reportException(e);View on GitHub (pinned to 61d99ed8e1)