```diff
--- test_files/482-original.txt	2025-03-07 19:07:03
+++ test_files/482-modified.txt	2025-03-07 19:07:03
@@ -1,74 +1,104 @@
-import apiClient from "../client/client"
-import { client as axiosClient } from "../client/services.gen"
+import { AxiosInstance } from "axios";
+import apiClient from "../client/client";
+import { client as axiosClient } from "../client/services.gen";
+import { setAxiosClientConfig } from "../utils/config";
+import { CEG } from "../utils/error";
+import { COMPOSIO_SDK_ERROR_CODES } from "../utils/errors/src/constants";
+import { removeTrailingSlashIfExists } from "../utils/string";
 
 /**
  * Class representing the details required to initialize and configure the API client.
  */
-export class BackendClient {
-    /**
-     * The API key used for authenticating requests.
-     */
-    public apiKey: string;
+export class AxiosBackendClient {
+  /**
+   * The API key used for authenticating requests.
+   */
+  public apiKey: string;
 
-    /**
-     * The base URL of the API against which requests will be made.
-     */
-    public baseUrl: string;
+  /**
+   * The base URL of the API against which requests will be made.
+   */
+  public baseUrl: string;
 
-    /**
-     * The runtime environment where the client is being used.
-     */
-    public runtime: string;
+  /**
+   * The runtime environment where the client is being used.
+   */
+  public runtime: string;
+  public instance: AxiosInstance;
 
-    /**
-     * Creates an instance of apiClientDetails.
-     * @param {string} apiKey - The API key for client initialization.
-     * @param {string} baseUrl - The base URL for the API client.
-     * @param {string} runtime - The runtime environment identifier.
-     * @throws Will throw an error if the API key is not provided.
-     */
-    constructor(apiKey: string, baseUrl: string, runtime?: string) {
-        this.runtime = runtime || '';
-        this.apiKey = apiKey;
-        this.baseUrl = baseUrl;
+  /**
+   * Creates an instance of apiClientDetails.
+   * @param {string} apiKey - The API key for client initialization.
+   * @param {string} baseUrl - The base URL for the API client.
+   * @param {string} runtime - The runtime environment identifier.
+   * @throws Will throw an error if the API key is not provided.
+   */
+  constructor(apiKey: string, baseUrl: string, runtime?: string) {
+    this.runtime = runtime || "";
+    this.apiKey = apiKey;
+    this.baseUrl = removeTrailingSlashIfExists(baseUrl);
+    this.instance = axiosClient.instance;
 
-        if (!apiKey) {
-            throw new Error(`API Key is required for initializing the client`);
+    if (!apiKey) {
+      throw CEG.getCustomError(
+        COMPOSIO_SDK_ERROR_CODES.COMMON.API_KEY_UNAVAILABLE,
+        {
+          message: "API key is not available",
+          description:
+            "The API key required for authentication is not provided. You can get the API key from the Composio dashboard.",
+          possibleFix: "Please provide the API key in the constructor",
         }
-
-        // Validate baseUrl
-        if (!baseUrl.startsWith("http://") && !baseUrl.startsWith("https://")) {
-            throw new Error(`Base URL is not valid, got ${baseUrl}`);
-        }
-
-        this.initializeApiClient();
+      );
     }
 
-    /**
-     * Retrieves the client ID from the user's information.
-     * @returns {Promise<string>} A promise that resolves to the client ID.
-     * @throws Will throw an error if the HTTP request fails.
-     */
-    public async getClientId(): Promise<string> {
-        const response = await apiClient.clientAuthService.getUserInfo();
-        if (response.status !== 200) {
-            throw new Error(`HTTP Error: ${response.status}`);
+    // Validate baseUrl
+    if (!baseUrl.startsWith("http://") && !baseUrl.startsWith("https://")) {
+      throw CEG.getCustomError(
+        COMPOSIO_SDK_ERROR_CODES.COMMON.BASE_URL_NOT_REACHABLE,
+        {
+          message: `🔗 Base URL ${baseUrl} is not valid`,
+          description: "The composio backend URL provided is not valid",
         }
-        return (response.data as unknown as Record<string, Record<string, string>>).client.id;
+      );
     }
 
-    /**
-     * Initializes the API client with the provided configuration.
-     * @private
-     */
-    private initializeApiClient() {
-        axiosClient.setConfig({
-            baseURL: this.baseUrl,
-            headers: {
-                'X-API-KEY': `${this.apiKey}`,
-                'X-SOURCE': 'js_sdk',
-                'X-RUNTIME': this.runtime
-            }
-        });
+    this.initializeApiClient();
+  }
+
+  /**
+   * Retrieves the client ID from the user's information.
+   * @returns {Promise<string>} A promise that resolves to the client ID.
+   * @throws Will throw an error if the HTTP request fails.
+   */
+  public async getClientId(): Promise<string> {
+    try {
+      const { data } = await apiClient.clientAuth.getUserInfo();
+      return data?.client?.id || "";
+    } catch (error) {
+      throw CEG.handleAllError(error);
     }
+  }
+
+  /**
+   * Initializes the API client with the provided configuration.
+   * @private
+   */
+  private initializeApiClient() {
+    axiosClient.setConfig({
+      baseURL: removeTrailingSlashIfExists(this.baseUrl),
+      headers: {
+        "X-API-KEY": `${this.apiKey}`,
+        "X-SOURCE": "js_sdk",
+        "X-RUNTIME": this.runtime,
+      },
+      throwOnError: true,
+    });
+
+    setAxiosClientConfig(axiosClient.instance);
+    this.instance = axiosClient.instance;
+  }
+
+  getAxiosInstance() {
+    return axiosClient.instance;
+  }
 }
```
