Skip to content

Commit

Permalink
fix: improve invalid api key error
Browse files Browse the repository at this point in the history
  • Loading branch information
stepan662 committed Feb 24, 2025
1 parent 32cddc4 commit 031c71a
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/client/ApiClient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import createClient, { ParseAs } from 'openapi-fetch';
import base32Decode from 'base32-decode';
import { API_KEY_PAK_PREFIX, USER_AGENT } from '../constants.js';
import { getApiKeyInformation } from './getApiKeyInformation.js';
import { debug, isDebugEnabled } from '../utils/logger.js';
import { debug } from '../utils/logger.js';
import { errorFromLoadable } from './errorFromLoadable.js';

async function parseResponse(response: Response, parseAs: ParseAs) {
Expand Down Expand Up @@ -99,6 +99,9 @@ export function createApiClient({
getApiKeyInfo() {
return getApiKeyInformation(apiClient, apiKey!);
},
getSettings(): ApiClientProps {
return { baseUrl, apiKey, projectId, autoThrow };
},
};
}

Expand Down

0 comments on commit 031c71a

Please sign in to comment.