Log SIP-019 notification for uningested contract as warning instead of error
Closed this issue · 1 comments
CharlieC3 commented
Seeing this error cause frequent crashes on startup when running on mainnet:
{"level":"error","time":"2023-06-02T20:03:13.785Z","pid":1,"hostname":"token-metadata-blue-writer-65cc9dfdb8-5qjsf","name":"token-metadata-api","err":{"type":"Error","message":"Contract not found with principal: SP1VH0AZXCJ9HE8CQJNSAFX2CF6Q038DDTTQZ6C8N.degen-hyena-pack","stack":"Error: Contract not found with principal: SP1VH0AZXCJ9HE8CQJNSAFX2CF6Q038DDTTQZ6C8N.degen-hyena-pack\n at /app/dist/src/pg/pg-store.js:244:23\n at process.processTicksAndRejections (node:internal/process/task_queues:95:5)\n at async scope (/app/node_modules/postgres/cjs/src/index.js:224:18)\n at async Function.begin (/app/node_modules/postgres/cjs/src/index.js:211:14)\n at async PgStore.enqueueTokenMetadataUpdateNotification (/app/dist/src/pg/pg-store.js:238:9)\n at async BlockchainImporter.importTokenMetadataRefreshNotifications (/app/dist/src/token-processor/blockchain-api/blockchain-importer.js:149:17)\n at async BlockchainImporter.import (/app/dist/src/token-processor/blockchain-api/blockchain-importer.js:50:17)\n at async initBackgroundServices (/app/dist/src/index.js:61:5)\n at async initApp (/app/dist/src/index.js:94:9)"},"msg":"App failed to start"}
Version: 0.3.0
rafaelcr commented
@CharlieC3 this looks like a SIP-019 notification that arrived before the original contract was ingested. I think this log message should just be demoted to a warning. I'll take care of that