Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

301
Vistas
errorCode 422 in my reactjs app using rapid api

This is my cryptoApi js file

import {createApi , fetchBaseQuery } from '@reduxjs/toolkit/query/react'

const cryptoApiHeaders = {
    'X-RapidAPI-Key': 'xxxxxxxx',
    'X-RapidAPI-Host': 'xxxxx'
}
const baseUrl = 'https://coinranking1.p.rapidapi.com';

const createRequest =(url) =>({url, headers: cryptoApiHeaders});
export const cryptoApi = createApi({
reducerPath: 'cryptoApi',
baseQuery: fetchBaseQuery({ baseUrl }),
endpoints: (builder) => ({
    getCryptos: builder.query({
        query: (count) => createRequest(`/coins?limit=${count}`),
    }),
    getCryptoDetails: builder.query({
        query: (coinuuid) => createRequest(`/coin/${coinuuid}`),
    }),
})
});
 
export const {
    useGetCryptosQuery,useGetCryptoDetailsQuery
} = cryptoApi;

this is my API file where I'm fetching data from bing news search API (RapidAPI) and I'm able to fetch all coins data but when I tried to get the data of a single coin it throws me an error of 422

about 4 years ago · Juan Pablo Isaza
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda