Calonz
Calonz
CCConvex Community
Created by Calonz on 7/18/2024 in #support-community
Convex X Clerk Issue: Application error: a client-side exception
Would you be able to show me what's the best way to handle it. Here's where the error coming from. Do you mind checking if this is the correct way to do it? or I should fix the application logic more on the client side?
export const getFeeds = query({
args: {...
},
handler: async (ctx, { filters }) => {
const identity = await userIdentity(ctx);

if (!identity) throw new ConvexError("Unauthorized!");

let feeds = await ctx.db.query("feeds").order("desc").collect();

...rest of the code
export const getFeeds = query({
args: {...
},
handler: async (ctx, { filters }) => {
const identity = await userIdentity(ctx);

if (!identity) throw new ConvexError("Unauthorized!");

let feeds = await ctx.db.query("feeds").order("desc").collect();

...rest of the code
and here's the userIdentity fn():
async function userIdentity(
ctx: QueryCtx | MutationCtx,
) {
const identity = await ctx.auth.getUserIdentity();

if (!identity) return null;

const user = await ctx.db
.query("users")
.withIndex("by_token", (q) => q.eq("tokenIdentifier", identity.tokenIdentifier))
.unique();

if (!user) return null;

return user;
}
async function userIdentity(
ctx: QueryCtx | MutationCtx,
) {
const identity = await ctx.auth.getUserIdentity();

if (!identity) return null;

const user = await ctx.db
.query("users")
.withIndex("by_token", (q) => q.eq("tokenIdentifier", identity.tokenIdentifier))
.unique();

if (!user) return null;

return user;
}
5 replies
CCConvex Community
Created by Calonz on 3/6/2024 in #support-community
Storage File Retrieval Failed: "upstream image response failed for ..."
Aight, let’s talk there
21 replies
CCConvex Community
Created by Calonz on 3/6/2024 in #support-community
Storage File Retrieval Failed: "upstream image response failed for ..."
@7uckingMad? can you show me the code where you’re getting the error?
21 replies
CCConvex Community
Created by Calonz on 3/6/2024 in #support-community
Storage File Retrieval Failed: "upstream image response failed for ..."
@7uckingMad? what do u need help with?
21 replies
CCConvex Community
Created by Calonz on 3/18/2024 in #support-community
How to use API Endpoint in Convex?
It worked out perfectly! Thanks! You guys are the best! @erquhart @lee
8 replies
CCConvex Community
Created by Calonz on 3/18/2024 in #support-community
How to use API Endpoint in Convex?
I'll trust you on this haha. I'll let you know if I succeeded using it!
8 replies
CCConvex Community
Created by Calonz on 3/18/2024 in #support-community
How to use API Endpoint in Convex?
Sounds good! let me try that
8 replies
CCConvex Community
Created by Calonz on 3/8/2024 in #support-community
Uncaught Error: ENOENT: no such file or directory
I'm always thankful for your support @erquhart 🙏
30 replies
CCConvex Community
Created by Calonz on 3/8/2024 in #support-community
Uncaught Error: ENOENT: no such file or directory
that's weird the ctx.storage.get() works now, it wasn't working before
30 replies
CCConvex Community
Created by Calonz on 3/8/2024 in #support-community
Uncaught Error: ENOENT: no such file or directory
yes, but let me try again just to make sure.
30 replies
CCConvex Community
Created by Calonz on 3/8/2024 in #support-community
Uncaught Error: ENOENT: no such file or directory
I did both
30 replies
CCConvex Community
Created by Calonz on 3/8/2024 in #support-community
Uncaught Error: ENOENT: no such file or directory
yup exactly the same
30 replies
CCConvex Community
Created by Calonz on 3/8/2024 in #support-community
Uncaught Error: ENOENT: no such file or directory
I actually tried that but it still gave me the same error
30 replies
CCConvex Community
Created by Calonz on 3/8/2024 in #support-community
Uncaught Error: ENOENT: no such file or directory
No description
30 replies
CCConvex Community
Created by Calonz on 3/8/2024 in #support-community
Uncaught Error: ENOENT: no such file or directory
I found a way, I don't know if this is the most efficient solution tho 😆
30 replies
CCConvex Community
Created by Calonz on 3/8/2024 in #support-community
Uncaught Error: ENOENT: no such file or directory
For sure, let me try to play it around a little bit. It actually worked before I just changed the code, maybe I'll bring the old code back and compare it.
30 replies
CCConvex Community
Created by Calonz on 3/8/2024 in #support-community
Uncaught Error: ENOENT: no such file or directory
is there any way to get around this?
30 replies
CCConvex Community
Created by Calonz on 3/6/2024 in #support-community
Storage File Retrieval Failed: "upstream image response failed for ..."
@erquhart and @presley Thanks to the two of you! 🙏 I was able to fixed the issue!
21 replies
CCConvex Community
Created by Calonz on 3/6/2024 in #support-community
Storage File Retrieval Failed: "upstream image response failed for ..."
Okay, let me just try that @erquhart . I think that should work by now 🤞
21 replies
CCConvex Community
Created by Calonz on 3/6/2024 in #support-community
Storage File Retrieval Failed: "upstream image response failed for ..."
No description
21 replies