AI Unit Tests & Type Check #62
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': '95ecfc0e1b3daa6d-ORD', connection: 'keep-alive', 'content-length': '496', 'content-type': 'application/json; charset=utf-8', date: 'Mon, 14 Jul 2025 00:43:13 GMT', server: 'cloudflare', 'set-cookie': '__cf_bm=4ZS.cAlm5p1GbeMkPyri2VXccRERCcRT.hzG3UCVKug-1752453793-1.0.1.1-esTNuN6d13_nUSEZeyvVLuN3K7II2Bs5QRn1lb8yxgqQX92Gl0jxDB7AamJxLzio64ud5zJk.m_Mj.0bfgIBBXzqcxJSoKccNBHUPz0.Eg0; path=/; expires=Mon, 14-Jul-25 01:13:13 GMT; domain=.api.openai.com; HttpOnly; Secure; SameSite=None, _cfuvid=FO4ezN61cCAMGgNrSRdX6Z3EgclHWFZWpPlimBcKjYs-1752453793063-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_6b7e3fc5ea8f3b944e682128fcf9296d' }, request_id: 'req_6b7e3fc5ea8f3b944e682128fcf9296d', 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': '95ecfc0e1e70f859-ORD', connection: 'keep-alive', 'content-length': '496', 'content-type': 'application/json; charset=utf-8', date: 'Mon, 14 Jul 2025 00:43:13 GMT', server: 'cloudflare', 'set-cookie': '__cf_bm=zoqLmgUoZzS0x2BeUdYRmd8IzgpUjQWkn_3SaG1ibIE-1752453793-1.0.1.1-hQjXDNqviEkQX.U8Q9OvaBzQL2CKTkPwefstICoi2f3dbuqXai7MU0AruGkQzJaLwa97GnrqoWcgJtGSNhSSBdQ4.GcNt1O.GXJaf5OdeIc; path=/; expires=Mon, 14-Jul-25 01:13:13 GMT; domain=.api.openai.com; HttpOnly; Secure; SameSite=None, _cfuvid=HfwhNNKXSPteOpNp8EsWcAUUsKXmfwAIrL0QRc1Dwvs-1752453793045-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_fae8c6b1d664343dd1ebdcac970edb5c' }, request_id: 'req_fae8c6b1d664343dd1ebdcac970edb5c', 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': '95ecfc0d9c59e80a-ORD', connection: 'keep-alive', 'content-length': '496', 'content-type': 'application/json; charset=utf-8', date: 'Mon, 14 Jul 2025 00:43:12 GMT', server: 'cloudflare', 'set-cookie': '__cf_bm=Ngz.hl9ArWNgE_aYVIgEAWJ4nEvtT94nPH.KVZb58UU-1752453792-1.0.1.1-OfVqzOR3NEpm5EoETIJ93ExxXc3ggMnd3VHd5JgMgmxG1nr2dGVI1_gI7tcdvkM5NerIModTo3W5QA3GYUB2aUjagzvzMH0YVihkWzckbEE; path=/; expires=Mon, 14-Jul-25 01:13:12 GMT; domain=.api.openai.com; HttpOnly; Secure; SameSite=None, _cfuvid=5y_WKBVXgQja_aX1qHN7M6tFN_RYpppTaK7zRWezH58-1752453792979-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_ecc82dde71a59223a089fceccc32a411' }, request_id: 'req_ecc82dde71a59223a089fceccc32a411', 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': '95ecfc0d8df602b8-ORD', connection: 'keep-alive', 'content-length': '496', 'content-type': 'application/json; charset=utf-8', date: 'Mon, 14 Jul 2025 00:43:12 GMT', server: 'cloudflare', 'set-cookie': '__cf_bm=nR3GQFJ1KqRs_._PvlKGhYpi1ozZYx_HuDwFrX1q61g-1752453792-1.0.1.1-s1iqANWhQ2iA.YtPazl_qbLHWDk7V4n8E_ensmcM1dRHvepuL4ZW3DKJG9cdIJKx1MbkZH1Xm.TxXxRUixaYGVG78LM8LNm50eNCOrNJqtA; path=/; expires=Mon, 14-Jul-25 01:13:12 GMT; domain=.api.openai.com; HttpOnly; Secure; SameSite=None, _cfuvid=YEgykXZ3bkrcc.QRvWHgYNHLc8eBT4gMc0jzd07AqVA-1752453792969-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_5559c8c4b8d2b1187ea19e2ebffeb285' }, request_id: 'req_5559c8c4b8d2b1187ea19e2ebffeb285', 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': '95ecfc0d9b33e124-ORD', connection: 'keep-alive', 'content-length': '496', 'content-type': 'application/json; charset=utf-8', date: 'Mon, 14 Jul 2025 00:43:12 GMT', server: 'cloudflare', 'set-cookie': '__cf_bm=PEqnk9UUlMaT2lnogcrZOAB9QQ.xwf4KE2HdIm39ULo-1752453792-1.0.1.1-5fid.Duox9LO9Wb9mvhl5RlT8SSeEXFCiLLpbSeAqpVYCbPQrskob.pbCqvIstIlehscFq0KK5zcaHrtRbdSJIG_bcTsIA8xqsN62gFuOuo; path=/; expires=Mon, 14-Jul-25 01:13:12 GMT; domain=.api.openai.com; HttpOnly; Secure; SameSite=None, _cfuvid=3weaYhukYaM9pzMxdBvMluLuwseuNpn8FHERlat4HtI-1752453792972-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_185f3a7fbad44fd95768ee824d380e61' }, request_id: 'req_185f3a7fbad44fd95768ee824d380e61', 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': '95ecfc0d8d70f859-ORD', connection: 'keep-alive', 'content-length': '496', 'content-type': 'application/json; charset=utf-8', date: 'Mon, 14 Jul 2025 00:43:12 GMT', server: 'cloudflare', 'set-cookie': '__cf_bm=vVDMnhukQR7nXCR7xxOdmYH6PJr8ilEpf0S97cDBBxc-1752453792-1.0.1.1-i_LG65Jw3q3dOv6kbmtMEeu7oShuuOe3AD25JZF9oT7qb_nQ_GElSPoKWAMFs4sxyK0._Tyc3d5BBXJt4XvAZrWIbEUvJvGdoLKwsNRk.PQ; path=/; expires=Mon, 14-Jul-25 01:13:12 GMT; domain=.api.openai.com; HttpOnly; Secure; SameSite=None, _cfuvid=2R_rZWAAF27WAc9XgTN9_9M80Blw_2j2sV6D62p8pwg-1752453792956-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_dbf93a3266c288817e2279ab3f515abf' }, request_id: 'req_dbf93a3266c288817e2279ab3f515abf', 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': '95ecfc0d89e6aa6d-ORD', connection: 'keep-alive', 'content-length': '496', 'content-type': 'application/json; charset=utf-8', date: 'Mon, 14 Jul 2025 00:43:12 GMT', server: 'cloudflare', 'set-cookie': '__cf_bm=XDaOWGnHyXZK8.8F1UreTTL9ABk0fVxvgx2ZK.yuUGc-1752453792-1.0.1.1-gQDQbOvkwBGz0II6szml12Y_hLmzdFn4vKToBQpJ8NpARFE_X1AYbGFMOgESicQXKb1BBsqbvLrqaf0xKhoI89gTN4QJhyH0M4sPtkb7h8s; path=/; expires=Mon, 14-Jul-25 01:13:12 GMT; domain=.api.openai.com; HttpOnly; Secure; SameSite=None, _cfuvid=DLDjYkvIIJbr_5qtI8HKTxEvXScVv2gei3zCDF75I_o-1752453792965-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_6f938978cc834819f4cb2a22fff63356' }, request_id: 'req_6f938978cc834819f4cb2a22fff63356', 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': '95ecfc0e3b8358ee-ORD', connection: 'keep-alive', 'content-length': '496', 'content-type': 'application/json; charset=utf-8', date: 'Mon, 14 Jul 2025 00:43:13 GMT', server: 'cloudflare', 'set-cookie': '__cf_bm=L2MqYnwfoqxxR1eRlRDFt2Y4zfdvPrG_CktkAL5EPXs-1752453793-1.0.1.1-H64YPxdhtd7Hjd3prgxOn_ljqKBUy8LYeinyYLRAle3CwD_40esb3J9lObl8yCkmOi1nznlX7rsH0gieLCquShXi8HfsSwJtpfbT2GdzzGU; path=/; expires=Mon, 14-Jul-25 01:13:13 GMT; domain=.api.openai.com; HttpOnly; Secure; SameSite=None, _cfuvid=dwAQuTQtozhwxZXlpxxncs6G7_ncWcKgXm8aqsQyk7Q-1752453793071-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_5bc0edc4ff68b378f71abd8f71c04c60' }, request_id: 'req_5bc0edc4ff68b378f71abd8f71c04c60', 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': '95ecfc0dba9758ee-ORD', connection: 'keep-alive', 'content-length': '496', 'content-type': 'application/json; charset=utf-8', date: 'Mon, 14 Jul 2025 00:43:12 GMT', server: 'cloudflare', 'set-cookie': '__cf_bm=1FuY9IrjiJjRNg3sBgVH5T8w87uIy9YraAgqlOpTFQ8-1752453792-1.0.1.1-Xvu6Wl1o44TnfdPr7f7.yM_rs.DpeL1Yxmy.jTFTduv5ONXMGQ0lr5Lra3T_cgLE8Fm9PYKS1a8KEO7y6TQOZUDQeDT8dfzsSm6buTzlLOQ; path=/; expires=Mon, 14-Jul-25 01:13:12 GMT; domain=.api.openai.com; HttpOnly; Secure; SameSite=None, _cfuvid=2IMCIZv_l82Zflzts5rGVABr2F7_jiKJxAEVWKHQDUQ-1752453792983-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_dd756e13830a2bd8d1022a67a0c1a62f' }, request_id: 'req_dd756e13830a2bd8d1022a67a0c1a62f', 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': '95ecfc0dadd77619-ORD', connection: 'keep-alive', 'content-length': '496', 'content-type': 'application/json; charset=utf-8', date: 'Mon, 14 Jul 2025 00:43:12 GMT', server: 'cloudflare', 'set-cookie': '__cf_bm=664XslsI8qi0XgkRFUvVrex4vNbd_c8s75xLVsorKl0-1752453792-1.0.1.1-qi36eqSftqu5y69a1Y2axdWexAE5kg6QSdLsQCy55B41SUASmJVOUk18P2hlX0uorc623ia88JXZDHLAPkNcKkhxIxpD8opKGQVNTgoerVc; path=/; expires=Mon, 14-Jul-25 01:13:12 GMT; domain=.api.openai.com; HttpOnly; Secure; SameSite=None, _cfuvid=i7hOAwZV_Rgz8WIXokTNyo2weadnJxoKvRmHmSRVJtY-1752453792963-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_8f45349a1015bb694e105d079041508b' }, request_id: 'req_8f45349a1015bb694e105d079041508b', 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 }
|