Comments (2)
I can't really reproduce it here:
store.subscribe(`*[wat`, {}, (err, result) => {
if (err) {
console.error('Oh no, an error:', err)
return
}
console.log('Result:', result)
})
This logs:
Oh no, an error: GroqSyntaxError: Syntax error in GROQ query at position 5
at Object.parse$1 [as parse] (/Users/holm/Documents/Sanity/groq-store/node_modules/groq-js/dist/groq-js.cjs.development.js:5427:38)
at query (/Users/holm/Documents/Sanity/groq-store/dist/node/groq-store.js:314:25)
at processTicksAndRejections (internal/process/task_queues.js:93:5) {
position: 5
}
Oh no, an error: GroqSyntaxError: Syntax error in GROQ query at position 5
at Object.parse$1 [as parse] (/Users/holm/Documents/Sanity/groq-store/node_modules/groq-js/dist/groq-js.cjs.development.js:5427:38)
at query (/Users/holm/Documents/Sanity/groq-store/dist/node/groq-store.js:314:25)
at processTicksAndRejections (internal/process/task_queues.js:93:5) {
position: 5
}
It's a bit weird that it logs it twice, but other than that it's getting sent correctly.
from groq-store.
My mistake, I incorrectly assumed the error was not being sent back up, but it was. I wasn't checking the error
object when using the hook in next-sanity
from groq-store.
Related Issues (3)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from groq-store.