Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

An error occured while postmark was processing a notification for customer.created #4

Open
usamaadev opened this issue Jan 18, 2024 · 1 comment
Assignees
Labels
bug Something isn't working

Comments

@usamaadev
Copy link

0|yarn dev  | info:    Processing customer.created which has 0 subscribers
0|yarn dev  | InvalidEmailRequestError: Zero recipients specified.
0|yarn dev  |     at ApiInputError.buildSpecificError (/home/rooot/project/node_modules/postmark/dist/client/errors/Errors.js:122:24)
0|yarn dev  |     at ErrorHandler.buildErrorByHttpStatusCode (/home/rooot/project/node_modules/postmark/dist/client/errors/ErrorHandler.js:43:45)
0|yarn dev  |     at ErrorHandler.buildError (/home/rooot/project/node_modules/postmark/dist/client/errors/ErrorHandler.js:26:25)
0|yarn dev  |     at AxiosHttpClient.transformError (/home/rooot/project/node_modules/postmark/dist/client/HttpClient.js:93:38)
0|yarn dev  |     at /home/rooot/project/node_modules/postmark/dist/client/HttpClient.js:77:41
0|yarn dev  |     at process.processTicksAndRejections (node:internal/process/task_queues:95:5) {
0|yarn dev  |   statusCode: 422,
0|yarn dev  |   code: 300
0|yarn dev  | }
0|yarn dev  | QueryFailedError: null value in column "to" violates not-null constraint
0|yarn dev  |     at PostgresQueryRunner.query (/home/rooot/project/node_modules/typeorm/driver/postgres/PostgresQueryRunner.js:211:19)
0|yarn dev  |     at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
0|yarn dev  |     at async InsertQueryBuilder.execute (/home/rooot/project/node_modules/typeorm/query-builder/InsertQueryBuilder.js:106:33)
0|yarn dev  |     at async SubjectExecutor.executeInsertOperations (/home/rooot/project/node_modules/typeorm/persistence/SubjectExecutor.js:260:42)
0|yarn dev  |     at async SubjectExecutor.execute (/home/rooot/project/node_modules/typeorm/persistence/SubjectExecutor.js:92:9)
0|yarn dev  |     at async EntityPersistExecutor.execute (/home/rooot/project/node_modules/typeorm/persistence/EntityPersistExecutor.js:140:21) {
0|yarn dev  |   query: 'INSERT INTO "public"."notification"("id", "created_at", "updated_at", "event_name", "resource_type", "resource_id", "customer_id", "to", "data", "parent_id", "provider_id") VALUES ($1, DEFAULT, DEFAULT, $2, $3, $4, $5, DEFAULT, $6, DEFAULT, $7) RETURNING "created_at", "updated_at"',
0|yarn dev  |   parameters: [
0|yarn dev  |     'noti_01HMF1MP79NFFH5T02JEEPEVDD',
0|yarn dev  |     'customer.created',
0|yarn dev  |     'customer',
0|yarn dev  |     'cus_01HMF1MMQ9S9F1JRM4DR18WQSF',
0|yarn dev  |     null,
0|yarn dev  |     '{"From":"XYZ","TemplateId":"34513370","TemplateModel":{"product_url":"","product_name":"","company_name":"XYZ","company_address":"XYZ"}}',
0|yarn dev  |     'postmark'
0|yarn dev  |   ],

I am getting an error for the event of "customer.created", all other emails are sent successfully like on order creation etc.

@Fullstak-nl
Copy link
Owner

Hello @usamaadev

Thank you for your issue.
I will release a patch tomorrow which will fix this.

Thank you

@Fullstak-nl Fullstak-nl self-assigned this Jan 18, 2024
@Fullstak-nl Fullstak-nl added the bug Something isn't working label Jan 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants