AI Unit Tests & Type Check #10
Annotations
4 errors
|
test
Process completed with exit code 1.
|
|
src/sql/functions.test.ts > title > title matches content:
packages/ai-commands/src/sql/functions.ts#L167
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.104.0_encoding@0.1.13_ws@8.18.3_zod@3.25.76/node_modules/openai/src/error.ts:76:14
❯ OpenAI.makeStatusError ../../node_modules/.pnpm/openai@4.104.0_encoding@0.1.13_ws@8.18.3_zod@3.25.76/node_modules/openai/src/core.ts:462:21
❯ OpenAI.makeRequest ../../node_modules/.pnpm/openai@4.104.0_encoding@0.1.13_ws@8.18.3_zod@3.25.76/node_modules/openai/src/core.ts:526:24
❯ titleSql src/sql/functions.ts:167: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': '9ce910021e996909-FRA', connection: 'keep-alive', 'content-length': '496', 'content-type': 'application/json; charset=utf-8', date: 'Mon, 16 Feb 2026 00:52:29 GMT', server: 'cloudflare', 'set-cookie': '__cf_bm=1fLXY2qzTwCLA8GHwxiGtAvZ2p3pw48pwY2pFPphAOg-1771203149.1393187-1.0.1.1-Hi7tQUADxW.KJ6ogBn5ezbkwwv9PgaZYUfwaAmadbNnaNHISVbW7ZtwE_rcYvrAupwlOvzVbhgaxHEuj49ghVuc2a48k8E79DAcwEb8IBK_v4yyAkgtU2wbpuY_ytSRB; HttpOnly; Secure; Path=/; Domain=api.openai.com; Expires=Mon, 16 Feb 2026 01:22:29 GMT, _cfuvid=6JX9xi6.rKOPx6WR4fUbqyIr5yTyK1VNlF2uotLeM5I-1771203149.1393187-1.0.1.1-GYI1hmkL1eabk5zVB4o4GSULuI9urpt7HZ5Qge2xaFY; HttpOnly; SameSite=None; Secure; Path=/; Domain=api.openai.com', 'strict-transport-security': 'max-age=31536000; includeSubDomains; preload', vary: 'Origin', 'x-content-type-options': 'nosniff', 'x-openai-proxy-wasm': 'v0.1', 'x-request-id': 'req_46333669e2fb4161b363e2030b8ad074' }, request_id: 'req_46333669e2fb4161b363e2030b8ad074', 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#L107
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.104.0_encoding@0.1.13_ws@8.18.3_zod@3.25.76/node_modules/openai/src/error.ts:76:14
❯ OpenAI.makeStatusError ../../node_modules/.pnpm/openai@4.104.0_encoding@0.1.13_ws@8.18.3_zod@3.25.76/node_modules/openai/src/core.ts:462:21
❯ OpenAI.makeRequest ../../node_modules/.pnpm/openai@4.104.0_encoding@0.1.13_ws@8.18.3_zod@3.25.76/node_modules/openai/src/core.ts:526:24
❯ debugSql src/sql/functions.ts:107: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': '9ce910011ca51e26-FRA', connection: 'keep-alive', 'content-length': '496', 'content-type': 'application/json; charset=utf-8', date: 'Mon, 16 Feb 2026 00:52:29 GMT', server: 'cloudflare', 'set-cookie': '__cf_bm=mfQR5ZxGkiG99j8GSUez4tqo2ml7m387HD.5a15Dr.A-1771203148.973184-1.0.1.1-PAAW1T_mu25MSZZCtWDgym.vlbNXZVQHumLAhsbuWMpvtXyuqi0pd4IyVEMLqt9KC0SU0uADug3UQQJgEU3E9cP3XekzeoKdlCm0GDvlGx_cgWHNQCg_ePQVrXUjFa88; HttpOnly; Secure; Path=/; Domain=api.openai.com; Expires=Mon, 16 Feb 2026 01:22:29 GMT, _cfuvid=QFr6chps1V8MVeqtCI4W8SU7jGFaD9apxqiFRqSEHxE-1771203148.973184-1.0.1.1-PmWYvVGZFsQ3mi2ZrZpvKHHvr_cBcqMbIJIDYjXey5Y; HttpOnly; SameSite=None; Secure; Path=/; Domain=api.openai.com', 'strict-transport-security': 'max-age=31536000; includeSubDomains; preload', vary: 'Origin', 'x-content-type-options': 'nosniff', 'x-openai-proxy-wasm': 'v0.1', 'x-request-id': 'req_9b356c63f94a4755bb36d09d4b8f8900' }, request_id: 'req_9b356c63f94a4755bb36d09d4b8f8900', 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#L107
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.104.0_encoding@0.1.13_ws@8.18.3_zod@3.25.76/node_modules/openai/src/error.ts:76:14
❯ OpenAI.makeStatusError ../../node_modules/.pnpm/openai@4.104.0_encoding@0.1.13_ws@8.18.3_zod@3.25.76/node_modules/openai/src/core.ts:462:21
❯ OpenAI.makeRequest ../../node_modules/.pnpm/openai@4.104.0_encoding@0.1.13_ws@8.18.3_zod@3.25.76/node_modules/openai/src/core.ts:526:24
❯ debugSql src/sql/functions.ts:107: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': '9ce910011e286909-FRA', connection: 'keep-alive', 'content-length': '496', 'content-type': 'application/json; charset=utf-8', date: 'Mon, 16 Feb 2026 00:52:29 GMT', server: 'cloudflare', 'set-cookie': '__cf_bm=VLclFvBvKV8utICy3sL1khcQbIY32quXX5u56Z1fXk0-1771203148.97478-1.0.1.1-E8t7ulvevOVYJS1_IJKckvWBjh_kCnKxJZf_AMKu91_MKgK4xpMJvwI3_P2_id8qW2MJFG.QsqdQP92Ww3rzDIlUFarqk0_PdtRPKa32L5B1z8wiAR02blZy.kRp7jC.; HttpOnly; Secure; Path=/; Domain=api.openai.com; Expires=Mon, 16 Feb 2026 01:22:29 GMT, _cfuvid=mo36yCn0RqeuDKUADc9EU0mw70CzO6pSMKdL_Cr.VeM-1771203148.97478-1.0.1.1-xi3TDfNQLMAHZ2uRTF5j6VJjSuR0M2DBoTfpqAxPac8; HttpOnly; SameSite=None; Secure; Path=/; Domain=api.openai.com', 'strict-transport-security': 'max-age=31536000; includeSubDomains; preload', vary: 'Origin', 'x-content-type-options': 'nosniff', 'x-openai-proxy-wasm': 'v0.1', 'x-request-id': 'req_958cd2c240b34ea08b5e3343a5ef3d2c' }, request_id: 'req_958cd2c240b34ea08b5e3343a5ef3d2c', 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 }
|