Skip to content

get artist info #56

@rickyl3aks

Description

@rickyl3aks
export const getSinger = async (id: number) => {
  try {
    const client = new Genius.Client(process.env.GENIUS_KEY_QUERY);
    const artist = await client.artists.get(id);
    console.log("Artist fetched:", artist);
    return artist;
  } catch (error) {
    console.error("getSinger error details:", error);
    return null;
  }
};

for some reason, I keep getting the error UND_ERR_INVALID_ARG. I’m passing the artist’s ID number and it has been working fine until recently

On the first page, fetching search results for artists works perfectly, however when I click on a particular song to get its lyrics and artist information, I encounter this error. I’m not sure why this is happening

might be related to the async function?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions