AI Unit Tests & Type Check #58
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': '950642358a65e601-IAD', connection: 'keep-alive', 'content-length': '496', 'content-type': 'application/json; charset=utf-8', date: 'Mon, 16 Jun 2025 00:40:56 GMT', server: 'cloudflare', 'set-cookie': '__cf_bm=Lf_rN_ix.8tGFjt63HqmQYaQefKem0rLOBB5DY6qbAo-1750034456-1.0.1.1-pMEWWzVB7b24PaMQM3SMfh4XOh_BR6BqwmznKnRADwCZgcjqmcHroq9E94icr1ege70ChGEvf9C0CZLFJ4JBEn87Uv8Cew4QwB85OT45v5U; path=/; expires=Mon, 16-Jun-25 01:10:56 GMT; domain=.api.openai.com; HttpOnly; Secure; SameSite=None, _cfuvid=ib6gh2TvgrhpHx38jWWjYoumy5OSrnThU7AeDj0y0GU-1750034456016-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_36d194c335ebef90e1ee874a5fd5677a' }, request_id: 'req_36d194c335ebef90e1ee874a5fd5677a', 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': '950642358ba7d643-IAD', connection: 'keep-alive', 'content-length': '496', 'content-type': 'application/json; charset=utf-8', date: 'Mon, 16 Jun 2025 00:40:56 GMT', server: 'cloudflare', 'set-cookie': '__cf_bm=un0uAFYLprdchAlYtzDByKgJ.ccHxqU2CJXOXyVY3Yc-1750034456-1.0.1.1-tDcn7AKLYJyTQCDRBQMS8s_TXAipiWMCs4zrYAsRckr3bxDUp46KdAwsEt0Okl.vHuIMTONrtvgH85K2WwRcVBmX_JKN.Zw2GfD.wLmzi.c; path=/; expires=Mon, 16-Jun-25 01:10:56 GMT; domain=.api.openai.com; HttpOnly; Secure; SameSite=None, _cfuvid=S_rqqwzadH8cAK4PLVdnQTDJw0b8qvVFHcpi.TYZJsk-1750034456014-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_7c1f6aa97890c43f23fa21c60806ffdf' }, request_id: 'req_7c1f6aa97890c43f23fa21c60806ffdf', 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': '95064234e8a1e601-IAD', connection: 'keep-alive', 'content-length': '496', 'content-type': 'application/json; charset=utf-8', date: 'Mon, 16 Jun 2025 00:40:55 GMT', server: 'cloudflare', 'set-cookie': '__cf_bm=.6LQy1v7aDpJ.pOhFCEPYiq__e1sAfxJLE1qQjGGb68-1750034455-1.0.1.1-lK5tGvU7_2BKAigHWDF7U7e8U6aWwFxhzrEka7OSDY08t4x4FKF8l2DIoGKwGGAS0j6Ti3GMwLIIOUwAsVmSrEWRnlAKhuecDnxIoI2pdZw; path=/; expires=Mon, 16-Jun-25 01:10:55 GMT; domain=.api.openai.com; HttpOnly; Secure; SameSite=None, _cfuvid=20Xc88fjqRDDCgS0_rCXdeGTFSEO90TKueAlC82bFuE-1750034455920-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_42493de6684fac82c38c71e12b08286d' }, request_id: 'req_42493de6684fac82c38c71e12b08286d', 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': '95064234e910c946-IAD', connection: 'keep-alive', 'content-length': '496', 'content-type': 'application/json; charset=utf-8', date: 'Mon, 16 Jun 2025 00:40:55 GMT', server: 'cloudflare', 'set-cookie': '__cf_bm=0bHnSRayHQPF1LcSAGm4._XBYM75rRe1o3_dmlMZEL8-1750034455-1.0.1.1-oq0wnZwAQsGGjk2AR9zsWFHJMsJr2hi5df78wO6x6j0FJo_ZcHLZctMs91n_7uhndkDTt0D_PonCJBLxqY0LxplkIyuLPwrbPKbWU6AjNuw; path=/; expires=Mon, 16-Jun-25 01:10:55 GMT; domain=.api.openai.com; HttpOnly; Secure; SameSite=None, _cfuvid=f4xq8D.SLihH0jzgtoY5hp8NHfL.OwRQcl8spo.FWK4-1750034455925-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_45b6b3f571e6beb46c247bcd5c925a9e' }, request_id: 'req_45b6b3f571e6beb46c247bcd5c925a9e', 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': '95064234fe0ac5a2-IAD', connection: 'keep-alive', 'content-length': '496', 'content-type': 'application/json; charset=utf-8', date: 'Mon, 16 Jun 2025 00:40:55 GMT', server: 'cloudflare', 'set-cookie': '__cf_bm=HGS7Q0k4MAiz7zYrTMc7G1KG_Oe3otGZ9k161TU3TLE-1750034455-1.0.1.1-wDKGcHA1qpO_w_CulF435YES7dFWjbrJYAG94freDSmNdn57FCmhE8KF_n7y9x2BokZokSRXLcyhjz5QwqnAnAM63z_y8Msthuc9u46T0js; path=/; expires=Mon, 16-Jun-25 01:10:55 GMT; domain=.api.openai.com; HttpOnly; Secure; SameSite=None, _cfuvid=oX8vbBW.l7LXlnPPt.YAKJv313yv2F7QU.aLNinZ0BE-1750034455924-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_c228a8408fbeddd86944eb75512ae9ff' }, request_id: 'req_c228a8408fbeddd86944eb75512ae9ff', 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': '95064234ea4fd643-IAD', connection: 'keep-alive', 'content-length': '496', 'content-type': 'application/json; charset=utf-8', date: 'Mon, 16 Jun 2025 00:40:55 GMT', server: 'cloudflare', 'set-cookie': '__cf_bm=YnEvIIqmhPMHnq9mdDQYtgeXfK81eb1ete3ArwswhN4-1750034455-1.0.1.1-K5nZdk0slHYjfMDnHyupVt4ldIPvkBCUo.9xLckDImiIvqOBYlPXxI2AOx3O6AtnpgfdxUss.sHBZi08BgyIvEhLuPeLWXFfx51STR7r6g8; path=/; expires=Mon, 16-Jun-25 01:10:55 GMT; domain=.api.openai.com; HttpOnly; Secure; SameSite=None, _cfuvid=A3RIzkP0SzsUiRuOjgHsqJpBwxFoYeiAkObkWb7PV1c-1750034455903-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_239d559c3c32380c321e56c040e89db4' }, request_id: 'req_239d559c3c32380c321e56c040e89db4', 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': '95064234edbae615-IAD', connection: 'keep-alive', 'content-length': '496', 'content-type': 'application/json; charset=utf-8', date: 'Mon, 16 Jun 2025 00:40:56 GMT', server: 'cloudflare', 'set-cookie': '__cf_bm=biWd_xI_Dg.LiTPdineprMmlwZMNWYD0A9OK23jluR8-1750034456-1.0.1.1-kiLypaYU9mDoK.Wv3CLKUg7AHeLrEnhiUksOCSRX9A0hY6xXZVClerikDfPg.1JhQbTpAWHNsslmTCdsXAnbgqxmvkiI00JIraHR9yTJ_9M; path=/; expires=Mon, 16-Jun-25 01:10:56 GMT; domain=.api.openai.com; HttpOnly; Secure; SameSite=None, _cfuvid=Uwh7Kcfgt7gV4MHwgJISZQiw0mjwmaF6PexMAbCX9WA-1750034456032-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_df6ee154985084fa5b116c0df5da315c' }, request_id: 'req_df6ee154985084fa5b116c0df5da315c', 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': '950642359afe8266-IAD', connection: 'keep-alive', 'content-length': '496', 'content-type': 'application/json; charset=utf-8', date: 'Mon, 16 Jun 2025 00:40:56 GMT', server: 'cloudflare', 'set-cookie': '__cf_bm=i3DvGKxJGqXE6sMHhf6WbC8dpGCnzyMLChg5SjILtEg-1750034456-1.0.1.1-1Pw_RMkLdehGhTfcmQHzRsHteCpiKqwEybf.8QBE2LwbBER5tGdDj4GZ.0WjwsQgwR.IOii6r9OCiVXGzV.F8VbJu_OGRpbvorAPas5EdoM; path=/; expires=Mon, 16-Jun-25 01:10:56 GMT; domain=.api.openai.com; HttpOnly; Secure; SameSite=None, _cfuvid=Uwh7Kcfgt7gV4MHwgJISZQiw0mjwmaF6PexMAbCX9WA-1750034456032-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_e19bac157dab15d99ac6e417c04beef1' }, request_id: 'req_e19bac157dab15d99ac6e417c04beef1', 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': '95064234da258266-IAD', connection: 'keep-alive', 'content-length': '496', 'content-type': 'application/json; charset=utf-8', date: 'Mon, 16 Jun 2025 00:40:55 GMT', server: 'cloudflare', 'set-cookie': '__cf_bm=ZgnTClNxf2se0f7cy6.QdxJrHqIT2oB89rem9tjHZfg-1750034455-1.0.1.1-rtBax2P_zm2g0LxH2JgCsaDGK1kBi26gNNcPePlT92hXyiMRAl2mZV9nK7Jz85hSWG9YC8M5DTMUn1WNHdXeqrGuglfBT1T39LHeIKEv.Yw; path=/; expires=Mon, 16-Jun-25 01:10:55 GMT; domain=.api.openai.com; HttpOnly; Secure; SameSite=None, _cfuvid=O7sDFfBf7ju4IPvf_pLB.bMidCgIuawnKSuV_stbq54-1750034455928-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_be895b2e613b128dcc19e03074b3f038' }, request_id: 'req_be895b2e613b128dcc19e03074b3f038', 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': '95064234cea52959-IAD', connection: 'keep-alive', 'content-length': '496', 'content-type': 'application/json; charset=utf-8', date: 'Mon, 16 Jun 2025 00:40:55 GMT', server: 'cloudflare', 'set-cookie': '__cf_bm=0sPz4TWG9C5YPL75a8007XCyEGA0GLb.bHJcb9G6epk-1750034455-1.0.1.1-hr0Q4GkeCXY3rNfkudoFfYrOqkqCR_c9zeJGcARFq7P.whlF9RvGkbVjO6bsrY8TlpW1lESawl5OQE5CR2TpO7P1YpvtzhxagGPQI9LowPk; path=/; expires=Mon, 16-Jun-25 01:10:55 GMT; domain=.api.openai.com; HttpOnly; Secure; SameSite=None, _cfuvid=bgNaXABLFlfKH_RsaiFPEenMXcWnFdEodTC59lMc8Vo-1750034455885-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_621087d605ec5e58d4ba419feea2634d' }, request_id: 'req_621087d605ec5e58d4ba419feea2634d', 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 }
|