A dictionary entry call for 'mauve' returns Error 404

shahoodshahood Member ✭✭

Hi,

I'm using this API in a test android app. For some good reason, when I try to get the dictionary entries for the word 'mauve', it returns me error 404; however, it is returning proper dictionary entries for the rest of the words I've tried so far.
Trying it on documentation page gives proper results too.

url on documentation page: https://od-api.oxforddictionaries.com:443/api/v1/entries/en/mauve

url generated by my app: https://od-api.oxforddictionaries.com/api/v1/entries/en/mauve

Pl let me know if I'm doing anything wrong.

Thanks

Comments

  • AmosDuveenAmosDuveen Member, Administrator, Moderator admin
    edited May 2018

    Your URL looks fine. I've tested it on my machine and it works. Was the error a one-off or is it consistently happening?

  • shahoodshahood Member ✭✭
    It is consistently happening in the case of this one word. I may be doing something wrong but am unable to figure it out.
    Oh yeah, I'm using retrofit 2.0 to pull data from the API. Is it possible the problem is due to that fact?
  • AmosDuveenAmosDuveen Member, Administrator, Moderator admin

    Hi @shahood,

    If the same setup is allowing you to make other entry calls then I don't see how only mauve could be affected.

    Have you gone through the basic checks such as spelling?

  • shahoodshahood Member ✭✭
    Please check it out
  • AmosDuveenAmosDuveen Member, Administrator, Moderator admin

    Very odd indeed.

    Could you please copy/paste the segment of your code which actually makes the request?

  • AmosDuveenAmosDuveen Member, Administrator, Moderator admin
    edited May 2018

    Hi @shahood,

    Taking a closer look at the clip you posted, you seem to be pulling synonym content as well as definition data. Mauve does not have a synonym entry (I doubt many of the non-primary colour words would).

    Could that be your problem?

    Have you also tested these (all have a dictionary entry but no thesaurus entry):

    • scarlet
    • backstroke
    • lemma
  • shahoodshahood Member ✭✭
    Quite a point. I've tested the three words u suggested and they behave the same way.
    I'll review the code with this thing in mind.
    Thanks.
  • AmosDuveenAmosDuveen Member, Administrator, Moderator admin

    Cool, glad it's sorted.

  • shahoodshahood Member ✭✭

    Your diagnosis was spot on!

    While generating thesaurus, I was not updating the adapter even for dictionary entries if the call for thesaurus ended up in a code else than 200. That was the issue.

    Thanks a lot!

  • AmosDuveenAmosDuveen Member, Administrator, Moderator admin

    You're welcome. Glad I could help.

Sign In or Register to comment.