iska
iska
Explore posts from servers
HHono
Created by iska on 8/21/2024 in #help
sentry is not a function
hi i m using hono sentry middleware getting
[ERROR] TypeError: sentry is not a function

at null.<anonymous>
(file:///Users/ben/projects/monorepo-sass/monorepo/libs/backend/services/authCf/src/lib/auth-cf.swagger.ts:26:10)
at async dispatch
(file:///Users/ben/projects/monorepo-sass/monorepo/node_modules/hono/dist/compose.js:29:17)
at null.<anonymous> (async
file:///Users/ben/projects/monorepo-sass/monorepo/wranglers/swagger/.wrangler/tmp/dev-ZR2b0h/auth-cf.swagger.js:26672:12)
at async dispatch
(file:///Users/ben/projects/monorepo-sass/monorepo/node_modules/hono/dist/compose.js:29:17)
at async cors2
(file:///Users/ben/projects/monorepo-sass/monorepo/node_modules/hono/dist/middleware/cors/index.js:70:5)
at async dispatch
(file:///Users/ben/projects/monorepo-sass/monorepo/node_modules/hono/dist/compose.js:29:17)
at null.<anonymous> (async
file:///Users/ben/projects/monorepo-sass/monorepo/wranglers/swagger/.wrangler/tmp/dev-ZR2b0h/auth-cf.swagger.js:15368:25)
at async jsonError
(file:///Users/ben/projects/monorepo-sass/monorepo/node_modules/wrangler/templates/middleware/middleware-miniflare3-json-error.ts:22:10)
at async drainBody
(file:///Users/ben/projects/monorepo-sass/monorepo/node_modules/wrangler/templates/middleware/middleware-ensure-req-body-drained.ts:5:10)
[ERROR] TypeError: sentry is not a function

at null.<anonymous>
(file:///Users/ben/projects/monorepo-sass/monorepo/libs/backend/services/authCf/src/lib/auth-cf.swagger.ts:26:10)
at async dispatch
(file:///Users/ben/projects/monorepo-sass/monorepo/node_modules/hono/dist/compose.js:29:17)
at null.<anonymous> (async
file:///Users/ben/projects/monorepo-sass/monorepo/wranglers/swagger/.wrangler/tmp/dev-ZR2b0h/auth-cf.swagger.js:26672:12)
at async dispatch
(file:///Users/ben/projects/monorepo-sass/monorepo/node_modules/hono/dist/compose.js:29:17)
at async cors2
(file:///Users/ben/projects/monorepo-sass/monorepo/node_modules/hono/dist/middleware/cors/index.js:70:5)
at async dispatch
(file:///Users/ben/projects/monorepo-sass/monorepo/node_modules/hono/dist/compose.js:29:17)
at null.<anonymous> (async
file:///Users/ben/projects/monorepo-sass/monorepo/wranglers/swagger/.wrangler/tmp/dev-ZR2b0h/auth-cf.swagger.js:15368:25)
at async jsonError
(file:///Users/ben/projects/monorepo-sass/monorepo/node_modules/wrangler/templates/middleware/middleware-miniflare3-json-error.ts:22:10)
at async drainBody
(file:///Users/ben/projects/monorepo-sass/monorepo/node_modules/wrangler/templates/middleware/middleware-ensure-req-body-drained.ts:5:10)
here is my implementation app.use('api/*', (c: Context, next: Next) => sentry({ dsn: c.env.SENTRY_DSN })(c, next))
1 replies
DTDrizzle Team
Created by iska on 8/19/2024 in #help
syntax atomic transaction d1 not working
getting [ERROR] To execute a transaction, please use the state.storage.transaction() API instead of the SQL BEGIN TRANSACTION or SAVEPOINT statements. The JavaScript API is safer because it will automatically roll back on exceptions, and because it interacts correctly with Durable Objects' automatic atomic write coalescing. when using return await this.db.transaction(async (tx) => { const encryptedEmail = await encrypt(email, this.env); const existingUser = await tx.select().from(users).where(eq(users.email, encryptedEmail)).get(); how to do atomic transaction while keeping drizzle orm syntax using d1 ?
2 replies
DTDrizzle Team
Created by iska on 8/19/2024 in #help
sharding orchestrator support suggestion
dunno if this is the right place to make a suggestion, but this would be such a good feature to support sharding especially for D1 db given their constraints (10 gb) and all the complexity that comes along with it aka "migrations"
1 replies
CDCloudflare Developers
Created by iska on 8/10/2024 in #pages-help
ci cd next on pages deployment error
- name: Deploy to Cloudflare Pages
uses: cloudflare/pages-action@v1
with:
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
projectName: ${{ steps.set-project-name.outputs.PROJECT_NAME }}
directory: apps/frontend/${{ steps.set-project-name.outputs.PROJECT_NAME }}/.vercel/output/static
gitHubToken: ${{ secrets.GITHUB_TOKEN }}
branch: ${{ github.ref_name }}
wranglerVersion: '3'
- name: Deploy to Cloudflare Pages
uses: cloudflare/pages-action@v1
with:
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
projectName: ${{ steps.set-project-name.outputs.PROJECT_NAME }}
directory: apps/frontend/${{ steps.set-project-name.outputs.PROJECT_NAME }}/.vercel/output/static
gitHubToken: ${{ secrets.GITHUB_TOKEN }}
branch: ${{ github.ref_name }}
wranglerVersion: '3'
here is my step and i get this error Run cloudflare/pages-action@v1
/Users/runner/work/_actions/cloudflare/pages-action/v1/index.js:5857 const error = new requestError.RequestError(toErrorMessage(data), status, { ^ RequestError [HttpError]: Resource not accessible by integration at /Users/runner/work/_actions/cloudflare/pages-action/v1/index.js:5857:25 at process.processTicksAndRejections (node:internal/process/task_queues:95:5) at async createGitHubDeployment (/Users/runner/work/_actions/cloudflare/pages-action/v1/index.js:22110:24) at async /Users/runner/work/_actions/cloudflare/pages-action/v1/index.js:22173:26 { status: 403, response: { url: 'https://api.github.com/repos/benab0509/monorepo/deployments', status: 403, headers: { what am i doing wrong ?
1 replies
DTDrizzle Team
Created by iska on 8/8/2024 in #help
using a monorepo with multiple apps and services
i would like to separate my migrations folder with sub directories for example a shared one where i could move all my shared schema and one sub directory per app name ? is there something remotely close to do that ? that would help alot for my ci/cd and avoid me to use some kind of post generate script to reorganize my migration folder
12 replies