AI Unit Tests & Type Check #61
Annotations
10 errors
|
src/sql/rls.test.ts > rls chat > delete policy has USING but not WITH CHECK:
packages/ai-commands/src/sql/rls.ts#L315
Error: 401 You didn't provide an API key. You need to provide your API key in an Authorization header using *** (i.e. Authorization: *** or as the password field (with blank username) if you're accessing the API from your browser and are prompted for a username and password. You can obtain an API key from https://platform.openai.com/account/api-keys.
❯ Function.generate ../../node_modules/.pnpm/openai@4.71.1_encoding@0.1.13_zod@3.23.8/node_modules/openai/src/error.ts:74:14
❯ OpenAI.makeStatusError ../../node_modules/.pnpm/openai@4.71.1_encoding@0.1.13_zod@3.23.8/node_modules/openai/src/core.ts:435:21
❯ OpenAI.makeRequest ../../node_modules/.pnpm/openai@4.71.1_encoding@0.1.13_zod@3.23.8/node_modules/openai/src/core.ts:499:24
❯ Module.chatRlsPolicy src/sql/rls.ts:315:22
❯ src/sql/rls.test.ts:242:28
⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯
Serialized Error: { status: 401, headers: { 'alt-svc': 'h3=":443"; ma=86400', 'cf-cache-status': 'DYNAMIC', 'cf-ray': '95b34de6e920fa3a-SJC', connection: 'keep-alive', 'content-length': '496', 'content-type': 'application/json; charset=utf-8', date: 'Mon, 07 Jul 2025 00:42:51 GMT', server: 'cloudflare', 'set-cookie': '__cf_bm=eUG2g64sOL.ugYo03BN.Somub6fXICzmabN01fIOG0Q-1751848971-1.0.1.1-Q7hyVzbxaWsgUsHDgZqQTBCTasmDt6fas4YBJ2QYI4hiGYa8daa_HczZI3dnmX.udu2SJheNBU0H6u569u24YIPgtkh28skQGV.nhh.TXnY; path=/; expires=Mon, 07-Jul-25 01:12:51 GMT; domain=.api.openai.com; HttpOnly; Secure; SameSite=None, _cfuvid=01RCm1bH25HgiVAhPgAdlNSNR6kjPgNhKqn4QL0NxXo-1751848971376-0.0.1.1-604800000; path=/; domain=.api.openai.com; HttpOnly; Secure; SameSite=None', 'strict-transport-security': 'max-age=31536000; includeSubDomains; preload', vary: 'Origin', 'x-content-type-options': 'nosniff', 'x-request-id': 'req_eacd20580d7b956645a642b2029be32f' }, request_id: 'req_eacd20580d7b956645a642b2029be32f', error: { message: 'You didn\'t provide an API key. You need to provide your API key in an Authorization header using *** (i.e. Authorization: *** or as the password field (with blank username) if you\'re accessing the API from your browser and are prompted for a username and password. You can obtain an API key from https://platform.openai.com/account/api-keys.', type: 'invalid_request_error', param: null, code: null }, code: null, param: null }
|
|
src/sql/rls.test.ts > rls chat > update policy has USING and WITH CHECK:
packages/ai-commands/src/sql/rls.ts#L315
Error: 401 You didn't provide an API key. You need to provide your API key in an Authorization header using *** (i.e. Authorization: *** or as the password field (with blank username) if you're accessing the API from your browser and are prompted for a username and password. You can obtain an API key from https://platform.openai.com/account/api-keys.
❯ Function.generate ../../node_modules/.pnpm/openai@4.71.1_encoding@0.1.13_zod@3.23.8/node_modules/openai/src/error.ts:74:14
❯ OpenAI.makeStatusError ../../node_modules/.pnpm/openai@4.71.1_encoding@0.1.13_zod@3.23.8/node_modules/openai/src/core.ts:435:21
❯ OpenAI.makeRequest ../../node_modules/.pnpm/openai@4.71.1_encoding@0.1.13_zod@3.23.8/node_modules/openai/src/core.ts:499:24
❯ Module.chatRlsPolicy src/sql/rls.ts:315:22
❯ src/sql/rls.test.ts:219:28
⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯
Serialized Error: { status: 401, headers: { 'alt-svc': 'h3=":443"; ma=86400', 'cf-cache-status': 'DYNAMIC', 'cf-ray': '95b34de6db47cf0e-SJC', connection: 'keep-alive', 'content-length': '496', 'content-type': 'application/json; charset=utf-8', date: 'Mon, 07 Jul 2025 00:42:51 GMT', server: 'cloudflare', 'set-cookie': '__cf_bm=z4_3QInzosFvp38EKRb1RjdEL3k6vKZUSu7FQs3K5Do-1751848971-1.0.1.1-0J9wPxJPTPGBlbtYnHBd.GN9flXJVm_ou.IyiMTpkmI8na.4L4p3B4WnkZURTFGHghTffY.v8oVzaOqPvZ6953OLV4D_HioQ6g79_aloiRg; path=/; expires=Mon, 07-Jul-25 01:12:51 GMT; domain=.api.openai.com; HttpOnly; Secure; SameSite=None, _cfuvid=9sGKZFY89_CbwbMLAl3KdJWvn08DbUZTGqGoJZEVTVU-1751848971365-0.0.1.1-604800000; path=/; domain=.api.openai.com; HttpOnly; Secure; SameSite=None', 'strict-transport-security': 'max-age=31536000; includeSubDomains; preload', vary: 'Origin', 'x-content-type-options': 'nosniff', 'x-request-id': 'req_4233f566ad7fa6f25f493588a33f0ab2' }, request_id: 'req_4233f566ad7fa6f25f493588a33f0ab2', error: { message: 'You didn\'t provide an API key. You need to provide your API key in an Authorization header using *** (i.e. Authorization: *** or as the password field (with blank username) if you\'re accessing the API from your browser and are prompted for a username and password. You can obtain an API key from https://platform.openai.com/account/api-keys.', type: 'invalid_request_error', param: null, code: null }, code: null, param: null }
|
|
src/sql/rls.test.ts > rls chat > insert policy has WITH CHECK but not USING:
packages/ai-commands/src/sql/rls.ts#L315
Error: 401 You didn't provide an API key. You need to provide your API key in an Authorization header using *** (i.e. Authorization: *** or as the password field (with blank username) if you're accessing the API from your browser and are prompted for a username and password. You can obtain an API key from https://platform.openai.com/account/api-keys.
❯ Function.generate ../../node_modules/.pnpm/openai@4.71.1_encoding@0.1.13_zod@3.23.8/node_modules/openai/src/error.ts:74:14
❯ OpenAI.makeStatusError ../../node_modules/.pnpm/openai@4.71.1_encoding@0.1.13_zod@3.23.8/node_modules/openai/src/core.ts:435:21
❯ OpenAI.makeRequest ../../node_modules/.pnpm/openai@4.71.1_encoding@0.1.13_zod@3.23.8/node_modules/openai/src/core.ts:499:24
❯ Module.chatRlsPolicy src/sql/rls.ts:315:22
❯ src/sql/rls.test.ts:196:28
⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯
Serialized Error: { status: 401, headers: { 'alt-svc': 'h3=":443"; ma=86400', 'cf-cache-status': 'DYNAMIC', 'cf-ray': '95b34de6a8dbfa3a-SJC', connection: 'keep-alive', 'content-length': '496', 'content-type': 'application/json; charset=utf-8', date: 'Mon, 07 Jul 2025 00:42:51 GMT', server: 'cloudflare', 'set-cookie': '__cf_bm=pjfYGxUrLk_yALXulAABgpSR85QuMHHRMYGv1eCB0kE-1751848971-1.0.1.1-rQcUe19O3qX4Ukf_hkHLxue0mDBP8kUgamOr3HrfhAIwaQa4x0GHL.Hk06bgAF8iJ6QuZqxRImRoxIMAw_OG.WXKCQ8StnWQt_uksNInl6Y; path=/; expires=Mon, 07-Jul-25 01:12:51 GMT; domain=.api.openai.com; HttpOnly; Secure; SameSite=None, _cfuvid=BKGDmnwyqDfrywavWT4mohFd2TbefdGTe.Z0woVrknw-1751848971336-0.0.1.1-604800000; path=/; domain=.api.openai.com; HttpOnly; Secure; SameSite=None', 'strict-transport-security': 'max-age=31536000; includeSubDomains; preload', vary: 'Origin', 'x-content-type-options': 'nosniff', 'x-request-id': 'req_d6ded577415b2bfea580cdf206a81a2e' }, request_id: 'req_d6ded577415b2bfea580cdf206a81a2e', error: { message: 'You didn\'t provide an API key. You need to provide your API key in an Authorization header using *** (i.e. Authorization: *** or as the password field (with blank username) if you\'re accessing the API from your browser and are prompted for a username and password. You can obtain an API key from https://platform.openai.com/account/api-keys.', type: 'invalid_request_error', param: null, code: null }, code: null, param: null }
|
|
src/sql/rls.test.ts > rls chat > select policy has USING but not WITH CHECK:
packages/ai-commands/src/sql/rls.ts#L315
Error: 401 You didn't provide an API key. You need to provide your API key in an Authorization header using *** (i.e. Authorization: *** or as the password field (with blank username) if you're accessing the API from your browser and are prompted for a username and password. You can obtain an API key from https://platform.openai.com/account/api-keys.
❯ Function.generate ../../node_modules/.pnpm/openai@4.71.1_encoding@0.1.13_zod@3.23.8/node_modules/openai/src/error.ts:74:14
❯ OpenAI.makeStatusError ../../node_modules/.pnpm/openai@4.71.1_encoding@0.1.13_zod@3.23.8/node_modules/openai/src/core.ts:435:21
❯ OpenAI.makeRequest ../../node_modules/.pnpm/openai@4.71.1_encoding@0.1.13_zod@3.23.8/node_modules/openai/src/core.ts:499:24
❯ Module.chatRlsPolicy src/sql/rls.ts:315:22
❯ src/sql/rls.test.ts:173:28
⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯
Serialized Error: { status: 401, headers: { 'alt-svc': 'h3=":443"; ma=86400', 'cf-cache-status': 'DYNAMIC', 'cf-ray': '95b34de6ad9267c7-SJC', connection: 'keep-alive', 'content-length': '496', 'content-type': 'application/json; charset=utf-8', date: 'Mon, 07 Jul 2025 00:42:51 GMT', server: 'cloudflare', 'set-cookie': '__cf_bm=WIsyVoVTb6mhaulIIRPg47mzhXfjKqSKX4cH2HxFkkQ-1751848971-1.0.1.1-uAqxcL7B1gxBFktrNPIAoDCJIxBFml9_i.MNd1PXyi3Zi_I5EAa1Gv.3LhUpKLNx5aK8AVlYKsMieL8ESSnl7I7pvUyxG_f_m3pj_i.HTLI; path=/; expires=Mon, 07-Jul-25 01:12:51 GMT; domain=.api.openai.com; HttpOnly; Secure; SameSite=None, _cfuvid=uRCno320TgT.vuDUzVE_3w9u9PHsX2TSGIVa7QSdcyQ-1751848971437-0.0.1.1-604800000; path=/; domain=.api.openai.com; HttpOnly; Secure; SameSite=None', 'strict-transport-security': 'max-age=31536000; includeSubDomains; preload', vary: 'Origin', 'x-content-type-options': 'nosniff', 'x-request-id': 'req_8997945571fe94fd2d3ac9eb8f524b87' }, request_id: 'req_8997945571fe94fd2d3ac9eb8f524b87', error: { message: 'You didn\'t provide an API key. You need to provide your API key in an Authorization header using *** (i.e. Authorization: *** or as the password field (with blank username) if you\'re accessing the API from your browser and are prompted for a username and password. You can obtain an API key from https://platform.openai.com/account/api-keys.', type: 'invalid_request_error', param: null, code: null }, code: null, param: null }
|
|
src/sql/rls.test.ts > rls chat > wraps every function in select:
packages/ai-commands/src/sql/rls.ts#L315
Error: 401 You didn't provide an API key. You need to provide your API key in an Authorization header using *** (i.e. Authorization: *** or as the password field (with blank username) if you're accessing the API from your browser and are prompted for a username and password. You can obtain an API key from https://platform.openai.com/account/api-keys.
❯ Function.generate ../../node_modules/.pnpm/openai@4.71.1_encoding@0.1.13_zod@3.23.8/node_modules/openai/src/error.ts:74:14
❯ OpenAI.makeStatusError ../../node_modules/.pnpm/openai@4.71.1_encoding@0.1.13_zod@3.23.8/node_modules/openai/src/core.ts:435:21
❯ OpenAI.makeRequest ../../node_modules/.pnpm/openai@4.71.1_encoding@0.1.13_zod@3.23.8/node_modules/openai/src/core.ts:499:24
❯ Module.chatRlsPolicy src/sql/rls.ts:315:22
❯ src/sql/rls.test.ts:115:28
⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯
Serialized Error: { status: 401, headers: { 'alt-svc': 'h3=":443"; ma=86400', 'cf-cache-status': 'DYNAMIC', 'cf-ray': '95b34de69a85cf0e-SJC', connection: 'keep-alive', 'content-length': '496', 'content-type': 'application/json; charset=utf-8', date: 'Mon, 07 Jul 2025 00:42:51 GMT', server: 'cloudflare', 'set-cookie': '__cf_bm=LPRGVck8ScP8wMcW8I5nc1CyRz5uKFN70_KRy1NE46Y-1751848971-1.0.1.1-G2yDSnfK3oI_.uteBF2.WRkKjoo01EVN7d0KGDEbCSXN8J0mjXGB9rnUAVyzpnn_UWDWD4CV.tx5HKuc8_7Ao8nQRdaY3isI4_cxybadQp0; path=/; expires=Mon, 07-Jul-25 01:12:51 GMT; domain=.api.openai.com; HttpOnly; Secure; SameSite=None, _cfuvid=H0GczY8jTHU6N.7YngJcVSwmE9FHFfSrae67LxMOwes-1751848971317-0.0.1.1-604800000; path=/; domain=.api.openai.com; HttpOnly; Secure; SameSite=None', 'strict-transport-security': 'max-age=31536000; includeSubDomains; preload', vary: 'Origin', 'x-content-type-options': 'nosniff', 'x-request-id': 'req_84867aeec5ea6ac81158c0673bb81511' }, request_id: 'req_84867aeec5ea6ac81158c0673bb81511', error: { message: 'You didn\'t provide an API key. You need to provide your API key in an Authorization header using *** (i.e. Authorization: *** or as the password field (with blank username) if you\'re accessing the API from your browser and are prompted for a username and password. You can obtain an API key from https://platform.openai.com/account/api-keys.', type: 'invalid_request_error', param: null, code: null }, code: null, param: null }
|
|
src/sql/rls.test.ts > rls chat > uses anon + authenticated roles when table viewable by anyone:
packages/ai-commands/src/sql/rls.ts#L315
Error: 401 You didn't provide an API key. You need to provide your API key in an Authorization header using *** (i.e. Authorization: *** or as the password field (with blank username) if you're accessing the API from your browser and are prompted for a username and password. You can obtain an API key from https://platform.openai.com/account/api-keys.
❯ Function.generate ../../node_modules/.pnpm/openai@4.71.1_encoding@0.1.13_zod@3.23.8/node_modules/openai/src/error.ts:74:14
❯ OpenAI.makeStatusError ../../node_modules/.pnpm/openai@4.71.1_encoding@0.1.13_zod@3.23.8/node_modules/openai/src/core.ts:435:21
❯ OpenAI.makeRequest ../../node_modules/.pnpm/openai@4.71.1_encoding@0.1.13_zod@3.23.8/node_modules/openai/src/core.ts:499:24
❯ Module.chatRlsPolicy src/sql/rls.ts:315:22
❯ src/sql/rls.test.ts:94:28
⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯
Serialized Error: { status: 401, headers: { 'alt-svc': 'h3=":443"; ma=86400', 'cf-cache-status': 'DYNAMIC', 'cf-ray': '95b34de69925232c-SJC', connection: 'keep-alive', 'content-length': '496', 'content-type': 'application/json; charset=utf-8', date: 'Mon, 07 Jul 2025 00:42:51 GMT', server: 'cloudflare', 'set-cookie': '__cf_bm=pjSuw0Zs2Eu6xzxEc6bEQPUbjdxEGPJTxfRr_lSjJIc-1751848971-1.0.1.1-pYCYhzsUjBqkiXhLP3YK9nKvcFbK9BPzP7IuEryWgXoOxANN3CnhHfQNvqMxGLd_KZda31LaP4Gr7fXVUKq7uwzgMR2zQhSMSmgRbt33rkY; path=/; expires=Mon, 07-Jul-25 01:12:51 GMT; domain=.api.openai.com; HttpOnly; Secure; SameSite=None, _cfuvid=xQGtvqocX.gHyiPQmALojalWH4BOWheJly1g0ip0bGU-1751848971354-0.0.1.1-604800000; path=/; domain=.api.openai.com; HttpOnly; Secure; SameSite=None', 'strict-transport-security': 'max-age=31536000; includeSubDomains; preload', vary: 'Origin', 'x-content-type-options': 'nosniff', 'x-request-id': 'req_7cb9ab364e24ae0cdfae417ae36b39e9' }, request_id: 'req_7cb9ab364e24ae0cdfae417ae36b39e9', error: { message: 'You didn\'t provide an API key. You need to provide your API key in an Authorization header using *** (i.e. Authorization: *** or as the password field (with blank username) if you\'re accessing the API from your browser and are prompted for a username and password. You can obtain an API key from https://platform.openai.com/account/api-keys.', type: 'invalid_request_error', param: null, code: null }, code: null, param: null }
|
|
src/sql/rls.test.ts > rls chat > defaults to authenticated role:
packages/ai-commands/src/sql/rls.ts#L315
Error: 401 You didn't provide an API key. You need to provide your API key in an Authorization header using *** (i.e. Authorization: *** or as the password field (with blank username) if you're accessing the API from your browser and are prompted for a username and password. You can obtain an API key from https://platform.openai.com/account/api-keys.
❯ Function.generate ../../node_modules/.pnpm/openai@4.71.1_encoding@0.1.13_zod@3.23.8/node_modules/openai/src/error.ts:74:14
❯ OpenAI.makeStatusError ../../node_modules/.pnpm/openai@4.71.1_encoding@0.1.13_zod@3.23.8/node_modules/openai/src/core.ts:435:21
❯ OpenAI.makeRequest ../../node_modules/.pnpm/openai@4.71.1_encoding@0.1.13_zod@3.23.8/node_modules/openai/src/core.ts:499:24
❯ Module.chatRlsPolicy src/sql/rls.ts:315:22
❯ src/sql/rls.test.ts:73:28
⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯
Serialized Error: { status: 401, headers: { 'alt-svc': 'h3=":443"; ma=86400', 'cf-cache-status': 'DYNAMIC', 'cf-ray': '95b34de6ade4ceb1-SJC', connection: 'keep-alive', 'content-length': '496', 'content-type': 'application/json; charset=utf-8', date: 'Mon, 07 Jul 2025 00:42:51 GMT', server: 'cloudflare', 'set-cookie': '__cf_bm=NxNULRKSsK1pwafW6Xwr1FzdSAuCbjit90iDZ.2s70Q-1751848971-1.0.1.1-YZBwmR9aHc2n.d0DxPvOWNi.uXqOGfNgBBDp11UjAafeHiW8n0NzURnhExSv5UvG53qU_26pe7Q0MNQUoueuH5mjI.UypXzX4DGltSwMMsM; path=/; expires=Mon, 07-Jul-25 01:12:51 GMT; domain=.api.openai.com; HttpOnly; Secure; SameSite=None, _cfuvid=8dzBzXbaIx651LP1X.FiaNKAlvDsYgUclFShLAridj0-1751848971377-0.0.1.1-604800000; path=/; domain=.api.openai.com; HttpOnly; Secure; SameSite=None', 'strict-transport-security': 'max-age=31536000; includeSubDomains; preload', vary: 'Origin', 'x-content-type-options': 'nosniff', 'x-request-id': 'req_6c50f84c7882db08acb4bb141c7c099e' }, request_id: 'req_6c50f84c7882db08acb4bb141c7c099e', error: { message: 'You didn\'t provide an API key. You need to provide your API key in an Authorization header using *** (i.e. Authorization: *** or as the password field (with blank username) if you\'re accessing the API from your browser and are prompted for a username and password. You can obtain an API key from https://platform.openai.com/account/api-keys.', type: 'invalid_request_error', param: null, code: null }, code: null, param: null }
|
|
src/sql/functions.test.ts > title > title matches content:
packages/ai-commands/src/sql/functions.ts#L166
Error: 401 You didn't provide an API key. You need to provide your API key in an Authorization header using *** (i.e. Authorization: *** or as the password field (with blank username) if you're accessing the API from your browser and are prompted for a username and password. You can obtain an API key from https://platform.openai.com/account/api-keys.
❯ Function.generate ../../node_modules/.pnpm/openai@4.71.1_encoding@0.1.13_zod@3.23.8/node_modules/openai/src/error.ts:74:14
❯ OpenAI.makeStatusError ../../node_modules/.pnpm/openai@4.71.1_encoding@0.1.13_zod@3.23.8/node_modules/openai/src/core.ts:435:21
❯ OpenAI.makeRequest ../../node_modules/.pnpm/openai@4.71.1_encoding@0.1.13_zod@3.23.8/node_modules/openai/src/core.ts:499:24
❯ Module.titleSql src/sql/functions.ts:166:32
❯ src/sql/functions.test.ts:50:36
⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯
Serialized Error: { status: 401, headers: { 'alt-svc': 'h3=":443"; ma=86400', 'cf-cache-status': 'DYNAMIC', 'cf-ray': '95b34de6ebca67ac-SJC', connection: 'keep-alive', 'content-length': '496', 'content-type': 'application/json; charset=utf-8', date: 'Mon, 07 Jul 2025 00:42:51 GMT', server: 'cloudflare', 'set-cookie': '__cf_bm=fcSC2fphHzfz0jE4Y8P720Dv8YdfLZBy7bx2ozgVP74-1751848971-1.0.1.1-CVKKf23iUhq2J7JMmOnyztJZTPeUBByYtTQhkujrwxrMRDwTmviaLlEAn63.GkekNh_mRadeA0ujD1RWbsQKAr..JHK07AAqKOPZpmChv8A; path=/; expires=Mon, 07-Jul-25 01:12:51 GMT; domain=.api.openai.com; HttpOnly; Secure; SameSite=None, _cfuvid=8dzBzXbaIx651LP1X.FiaNKAlvDsYgUclFShLAridj0-1751848971377-0.0.1.1-604800000; path=/; domain=.api.openai.com; HttpOnly; Secure; SameSite=None', 'strict-transport-security': 'max-age=31536000; includeSubDomains; preload', vary: 'Origin', 'x-content-type-options': 'nosniff', 'x-request-id': 'req_3df30576acbbbc63f0d31b22cfb1c621' }, request_id: 'req_3df30576acbbbc63f0d31b22cfb1c621', error: { message: 'You didn\'t provide an API key. You need to provide your API key in an Authorization header using *** (i.e. Authorization: *** or as the password field (with blank username) if you\'re accessing the API from your browser and are prompted for a username and password. You can obtain an API key from https://platform.openai.com/account/api-keys.', type: 'invalid_request_error', param: null, code: null }, code: null, param: null }
|
|
src/sql/functions.test.ts > debug > fix typos:
packages/ai-commands/src/sql/functions.ts#L106
Error: 401 You didn't provide an API key. You need to provide your API key in an Authorization header using *** (i.e. Authorization: *** or as the password field (with blank username) if you're accessing the API from your browser and are prompted for a username and password. You can obtain an API key from https://platform.openai.com/account/api-keys.
❯ Function.generate ../../node_modules/.pnpm/openai@4.71.1_encoding@0.1.13_zod@3.23.8/node_modules/openai/src/error.ts:74:14
❯ OpenAI.makeStatusError ../../node_modules/.pnpm/openai@4.71.1_encoding@0.1.13_zod@3.23.8/node_modules/openai/src/core.ts:435:21
❯ OpenAI.makeRequest ../../node_modules/.pnpm/openai@4.71.1_encoding@0.1.13_zod@3.23.8/node_modules/openai/src/core.ts:499:24
❯ Module.debugSql src/sql/functions.ts:106:32
❯ src/sql/functions.test.ts:35:31
⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯
Serialized Error: { status: 401, headers: { 'alt-svc': 'h3=":443"; ma=86400', 'cf-cache-status': 'DYNAMIC', 'cf-ray': '95b34de69b6167ac-SJC', connection: 'keep-alive', 'content-length': '496', 'content-type': 'application/json; charset=utf-8', date: 'Mon, 07 Jul 2025 00:42:51 GMT', server: 'cloudflare', 'set-cookie': '__cf_bm=vJ9MXwBsWfmXew0I1cfiV_Ln4x_BijjCO6CSQStnrEg-1751848971-1.0.1.1-G0Q.KWpQmKXIsKP6lcKp6VN8sbOmmz2QSzCVMhEKIhYP_YmV6cAEAjA7AwgQRoDP3chLysZnBnK5.6s4FVB72aUIUExKq_FlWKygpPD80is; path=/; expires=Mon, 07-Jul-25 01:12:51 GMT; domain=.api.openai.com; HttpOnly; Secure; SameSite=None, _cfuvid=3.fROVWVp4PdPaK.d..LpigC7X93O2.oZLDizbfvmOs-1751848971326-0.0.1.1-604800000; path=/; domain=.api.openai.com; HttpOnly; Secure; SameSite=None', 'strict-transport-security': 'max-age=31536000; includeSubDomains; preload', vary: 'Origin', 'x-content-type-options': 'nosniff', 'x-request-id': 'req_70896e1df81f54d0aac1448f089edb09' }, request_id: 'req_70896e1df81f54d0aac1448f089edb09', error: { message: 'You didn\'t provide an API key. You need to provide your API key in an Authorization header using *** (i.e. Authorization: *** or as the password field (with blank username) if you\'re accessing the API from your browser and are prompted for a username and password. You can obtain an API key from https://platform.openai.com/account/api-keys.', type: 'invalid_request_error', param: null, code: null }, code: null, param: null }
|
|
src/sql/functions.test.ts > debug > fix order of operations:
packages/ai-commands/src/sql/functions.ts#L106
Error: 401 You didn't provide an API key. You need to provide your API key in an Authorization header using *** (i.e. Authorization: *** or as the password field (with blank username) if you're accessing the API from your browser and are prompted for a username and password. You can obtain an API key from https://platform.openai.com/account/api-keys.
❯ Function.generate ../../node_modules/.pnpm/openai@4.71.1_encoding@0.1.13_zod@3.23.8/node_modules/openai/src/error.ts:74:14
❯ OpenAI.makeStatusError ../../node_modules/.pnpm/openai@4.71.1_encoding@0.1.13_zod@3.23.8/node_modules/openai/src/core.ts:435:21
❯ OpenAI.makeRequest ../../node_modules/.pnpm/openai@4.71.1_encoding@0.1.13_zod@3.23.8/node_modules/openai/src/core.ts:499:24
❯ Module.debugSql src/sql/functions.ts:106:32
❯ src/sql/functions.test.ts:13:21
⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯
Serialized Error: { status: 401, headers: { 'alt-svc': 'h3=":443"; ma=86400', 'cf-cache-status': 'DYNAMIC', 'cf-ray': '95b34de6980ecff5-SJC', connection: 'keep-alive', 'content-length': '496', 'content-type': 'application/json; charset=utf-8', date: 'Mon, 07 Jul 2025 00:42:51 GMT', server: 'cloudflare', 'set-cookie': '__cf_bm=DBQoI.JE9hkwhgkqlKHEU8Bjytm8Pay.nuElDr7xWlI-1751848971-1.0.1.1-JG7j1_SuOOwawSeIQGWB9J3zacU_X.qlEsv1QoHLE76hrmxRz0j2CubjuHAiMzC7pIEJ2V5d0X3VbDivrdxSY.zlYFio.tZvZNx9BT7hTXY; path=/; expires=Mon, 07-Jul-25 01:12:51 GMT; domain=.api.openai.com; HttpOnly; Secure; SameSite=None, _cfuvid=Rk1ZAxUsN7BDH6r7VFJh8pDKSOItJhm1Df91jBkoiJ4-1751848971321-0.0.1.1-604800000; path=/; domain=.api.openai.com; HttpOnly; Secure; SameSite=None', 'strict-transport-security': 'max-age=31536000; includeSubDomains; preload', vary: 'Origin', 'x-content-type-options': 'nosniff', 'x-request-id': 'req_01942424db807fde0f1088c00d8c62b8' }, request_id: 'req_01942424db807fde0f1088c00d8c62b8', error: { message: 'You didn\'t provide an API key. You need to provide your API key in an Authorization header using *** (i.e. Authorization: *** or as the password field (with blank username) if you\'re accessing the API from your browser and are prompted for a username and password. You can obtain an API key from https://platform.openai.com/account/api-keys.', type: 'invalid_request_error', param: null, code: null }, code: null, param: null }
|