AI Unit Tests & Type Check #53
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
❯ 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': '94cd2f9d0abad705-IAD', connection: 'keep-alive', 'content-length': '496', 'content-type': 'application/json; charset=utf-8', date: 'Mon, 09 Jun 2025 02:26:46 GMT', server: 'cloudflare', 'set-cookie': '__cf_bm=pOtONduAbPmEl2zrhpU84CvlQZYwj00UqMhpwi7btnE-1749436006-1.0.1.1-CWf9pKdN40tO6EC_XlMN3rbVPD0SIiBf0Iu3S8bFNrN.8EyVE6L7ZasyHBn3st4PO30VqDLiJF.2bpkfijbHbksoEzJAl4OW14IKmtOzU1Y; path=/; expires=Mon, 09-Jun-25 02:56:46 GMT; domain=.api.openai.com; HttpOnly; Secure; SameSite=None, _cfuvid=_Hjze4ewJexIOlRkkEWmXcSPUA2dfHx9EFvgkEgd3Kg-1749436006033-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_4656b8a4454d793f9e13b5eb3f4e4e40' }, request_id: 'req_4656b8a4454d793f9e13b5eb3f4e4e40', 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
❯ 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': '94cd2f9cfa8c8651-IAD', connection: 'keep-alive', 'content-length': '496', 'content-type': 'application/json; charset=utf-8', date: 'Mon, 09 Jun 2025 02:26:46 GMT', server: 'cloudflare', 'set-cookie': '__cf_bm=AFGea_eTrLle18Xf33sHob25k58rusbKp_tV.pYLkeE-1749436006-1.0.1.1-ooB5XEGGVpoXgDYJj0JHKo6ZNeKIcgHAhl2TZ.gPBtM_elJJ4fjAnrGjd9eMiYBxDkgyHvg7NlJBo2O.u58xil2Gyd6Aux_gX9TkHlOSquI; path=/; expires=Mon, 09-Jun-25 02:56:46 GMT; domain=.api.openai.com; HttpOnly; Secure; SameSite=None, _cfuvid=QroOg8vJnS6bCSOpmWFLP5nUu.s.g0ifxLis_ZXYHeo-1749436006007-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_41bcf02ea9f069ecb8d99e16b8bf4c91' }, request_id: 'req_41bcf02ea9f069ecb8d99e16b8bf4c91', 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
❯ 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': '94cd2f9c5c63884f-IAD', connection: 'keep-alive', 'content-length': '496', 'content-type': 'application/json; charset=utf-8', date: 'Mon, 09 Jun 2025 02:26:45 GMT', server: 'cloudflare', 'set-cookie': '__cf_bm=D1t5zm5VCFEHT9m_idZh9xflpdwOyuTXPpj_iQG9jyY-1749436005-1.0.1.1-mXKrakS51c8c.s6PPEwiGcmUQttmn0053359ye4LR9e9wBn2SsGaJDpAW1ceYmiGM3XAA_8MTDnaakGKCnUc9ariBH3SVYjIWq7Re0_xqW0; path=/; expires=Mon, 09-Jun-25 02:56:45 GMT; domain=.api.openai.com; HttpOnly; Secure; SameSite=None, _cfuvid=GzpSdZYdB14P4j51iPwTSRFwVUXL7BOhWtWHJcmY2gQ-1749436005908-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_1c03b72360cc527a6354f8370012bd67' }, request_id: 'req_1c03b72360cc527a6354f8370012bd67', 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
❯ 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': '94cd2f9c4ae005b9-IAD', connection: 'keep-alive', 'content-length': '496', 'content-type': 'application/json; charset=utf-8', date: 'Mon, 09 Jun 2025 02:26:45 GMT', server: 'cloudflare', 'set-cookie': '__cf_bm=vkfzsWXXsIwpxz_BD91n2FMT1Bua7GSqvkhf3cJ4VPU-1749436005-1.0.1.1-nxgi3DBoe0Qv4hX8ypUZrYyrUlwUdCI45WYKV0IKWK82VySGY_INataHOVZT84iX2EB9IGphcL3RS7_2hG19S7Y2l_qA5G27xky3C4OSDm8; path=/; expires=Mon, 09-Jun-25 02:56:45 GMT; domain=.api.openai.com; HttpOnly; Secure; SameSite=None, _cfuvid=Zo2NuDAKha67vYSXKMW8WT._g7c6LmdlSF_a5YSWv38-1749436005914-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_502a13bfdf39d817fef421ef8e0c1255' }, request_id: 'req_502a13bfdf39d817fef421ef8e0c1255', 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
❯ 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': '94cd2f9c4900d705-IAD', connection: 'keep-alive', 'content-length': '496', 'content-type': 'application/json; charset=utf-8', date: 'Mon, 09 Jun 2025 02:26:45 GMT', server: 'cloudflare', 'set-cookie': '__cf_bm=1Hr0kllp_MHBv9W7OZzn_Yzbu_yBonk2A_kcGJOUIE0-1749436005-1.0.1.1-TSn34mgzWnmnH467E_LtB4NngxHyVr9Cpp.QkTAuUZOuuE1sspeXTr1ngrvcV5xuip6Gm0UxJyjZWoW2WxbWmCPWE2z6iZs8szHCdJKzC.w; path=/; expires=Mon, 09-Jun-25 02:56:45 GMT; domain=.api.openai.com; HttpOnly; Secure; SameSite=None, _cfuvid=5BLs0SYu99mfJdrcYYt30qZSMcUNUzhTa0SRacBv8vQ-1749436005904-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_7577666731db14f3540b6cb338556fbc' }, request_id: 'req_7577666731db14f3540b6cb338556fbc', 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
❯ 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': '94cd2f9c5b20e627-IAD', connection: 'keep-alive', 'content-length': '496', 'content-type': 'application/json; charset=utf-8', date: 'Mon, 09 Jun 2025 02:26:45 GMT', server: 'cloudflare', 'set-cookie': '__cf_bm=bPa_JV3wCQHj8ifAYjc61V0KFJ3YpfKOBvsFIYSDSvo-1749436005-1.0.1.1-vmj2gVJi8xTkcoERxE2b1uEa9vtvaVBciolvxBXPGfmEnLBKuhFUodxnCx8MlNg51Z5QFEyzydl_aPtKgmT3xj_yvFSjoQmmvJA3IQqs5iM; path=/; expires=Mon, 09-Jun-25 02:56:45 GMT; domain=.api.openai.com; HttpOnly; Secure; SameSite=None, _cfuvid=PWlUVhpbYUu5X928DSjD3O9iDnPdoFBau.NzPMnULdw-1749436005941-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_e50cc835f9cb7c0c56c319732f82fcef' }, request_id: 'req_e50cc835f9cb7c0c56c319732f82fcef', 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
❯ 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': '94cd2f9c48a28651-IAD', connection: 'keep-alive', 'content-length': '496', 'content-type': 'application/json; charset=utf-8', date: 'Mon, 09 Jun 2025 02:26:45 GMT', server: 'cloudflare', 'set-cookie': '__cf_bm=A1NTDUTiPdlrwpZoDepHp0.tMh_gVvZ3mzoHjkeRa3M-1749436005-1.0.1.1-m9_9vobHPUtBxa.uNd7XwhozmyaoQMck1v5kuvZkJzXDp.M.WM2DRFx8YuOAVQ02bhGvcpdtEyRiPKo0EWMteSgIzNMLBAPjQJ12bHbX8JA; path=/; expires=Mon, 09-Jun-25 02:56:45 GMT; domain=.api.openai.com; HttpOnly; Secure; SameSite=None, _cfuvid=Z_ksTDBZ.ZR_K2f.Zu.62EBP8NDp8V1_olbSqRjYtnQ-1749436005899-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_40d0b74b380b22a3ad4b9ca42503dafd' }, request_id: 'req_40d0b74b380b22a3ad4b9ca42503dafd', 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
❯ 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': '94cd2f9d2ebf2892-IAD', connection: 'keep-alive', 'content-length': '496', 'content-type': 'application/json; charset=utf-8', date: 'Mon, 09 Jun 2025 02:26:46 GMT', server: 'cloudflare', 'set-cookie': '__cf_bm=Ig8NV_aD6o9myiODKda8aqKeVHkJCY1lszQfOgrSt24-1749436006-1.0.1.1-_Y3XNptA.jshdgHKXdkDpNyXigEa6EGb1NhwBK8f3m46uOo41ZbHCNjGbaUwGB9MIs01ZnSoQs3m5hiiC_rxPj6p6Y.p8P6ZnEWkqxZ3rS0; path=/; expires=Mon, 09-Jun-25 02:56:46 GMT; domain=.api.openai.com; HttpOnly; Secure; SameSite=None, _cfuvid=hrNg_CATAtaSPMpUEOm4VpN57DezzrRlW0LcLGT2OBs-1749436006029-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_64b293bc0be9ac2aad3961b8cf46d4e0' }, request_id: 'req_64b293bc0be9ac2aad3961b8cf46d4e0', 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
❯ 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': '94cd2f9c6f6b82e4-IAD', connection: 'keep-alive', 'content-length': '496', 'content-type': 'application/json; charset=utf-8', date: 'Mon, 09 Jun 2025 02:26:45 GMT', server: 'cloudflare', 'set-cookie': '__cf_bm=i1smXnpNP4v9b1Pj1WPhdU2Pc7gdoY5qXv4Q68hpqEw-1749436005-1.0.1.1-SpXtr7Vcc6Xk69ZQ_.U4UZO7Vv_uVzjl5J_2X6ww67TYsVPp6ivkY92yOoV7cQZm7uP.BWMsMhLqzpTR_n2E9UtQCOY6UaU5YMq8YUiD.go; path=/; expires=Mon, 09-Jun-25 02:56:45 GMT; domain=.api.openai.com; HttpOnly; Secure; SameSite=None, _cfuvid=fekhwmNpxyjZndn2AhrijlP3UodTTwaNdat5Kt0ocO8-1749436005921-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_f50cc838d5e10d999e8111cbbfab2f3b' }, request_id: 'req_f50cc838d5e10d999e8111cbbfab2f3b', 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
❯ 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': '94cd2f9c6dfb2892-IAD', connection: 'keep-alive', 'content-length': '496', 'content-type': 'application/json; charset=utf-8', date: 'Mon, 09 Jun 2025 02:26:45 GMT', server: 'cloudflare', 'set-cookie': '__cf_bm=egUOkz9R9eor5DE2V984jzl4AHehBHN3Ngiwr7ftGqc-1749436005-1.0.1.1-CQxHwgK3B9Py7yEAFMZV8aCHpdPiPBPrbdQiNg4BiSVmSEQ8NbMeuwfai6YNsC6KJ.Ucv42AdwfwTw5klXCHyLrRGPvi4U93OP1Z.v_bhJM; path=/; expires=Mon, 09-Jun-25 02:56:45 GMT; domain=.api.openai.com; HttpOnly; Secure; SameSite=None, _cfuvid=BRn9iZS.UNwDx1qTCv3hStGclguqX0roK8tVKyNOXV0-1749436005935-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_4afec867b0aef94e9b08ee3e57048603' }, request_id: 'req_4afec867b0aef94e9b08ee3e57048603', 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 }
|