Skip to content

getGroupMember does not handle 404s correctly #25

@SticksDev

Description

@SticksDev

When testing my API service, I noticed that if you pass an invaild user id or a user that doesn't exist into getGroupMember, it won't surface the 404 from VRC. On the latest version (2.20.5). Here's the error I get when this happens

Image

and the code I used to check if this is an error from the lib:

if (groupMemberError || !response) {
        console.log('groupMemberError', groupMemberError);
        console.log('response', response);
        if (groupMemberError instanceof VRChatError) {
            if (groupMemberError.statusCode === 404) {
                return c.json(APIErrors.groups.groupNotFound, 404);
            }
        }
        logger.error(
            `Error fetching group member ${userId} for group ${groupId}:`,
            groupMemberError,
        );
        return c.json(APIErrors.groups.errorFetchingMember, 500);
    }

We are dropping past the VRChatError case because of the internal error. Let me know If I need to provide or do anything to get this fixed.

Thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions