hackIDE icon indicating copy to clipboard operation
hackIDE copied to clipboard

Make API error message more verbose

Open sahildua2305 opened this issue 8 years ago • 27 comments

I think we should make the error message more verbose explaining that it's API's fault and it's temporary.

For more details: See #31

sahildua2305 avatar Jul 21 '16 13:07 sahildua2305

@bronwynbiro sorry for late reply. Are you still interested in tackling this issue?

sahildua2305 avatar Nov 15 '16 00:11 sahildua2305

It would be my first time, but with some help I think I should manage

lawfets avatar Nov 23 '16 15:11 lawfets

@lawfets thanks for your interest in contributing to HackIDE.

Regarding this issue, it should be an easy one. We want to show better error messages to users in case API calls to HackerEarth fails. Please look into the main javascript file to find fail methods in ajax requests.

sahildua2305 avatar Nov 23 '16 15:11 sahildua2305

I'll check it out it would be good to know where the main javascript file is

lawfets avatar Nov 23 '16 15:11 lawfets

where can I find the main javascript file?

lawfets avatar Nov 23 '16 16:11 lawfets

Here - https://github.com/sahildua2305/hackIDE/blob/master/hackIDE/static/hackIDE/js/custom.js#L309

This is the error message we show if API request fails. We should be able to see the response and show the message according to the response message.

sahildua2305 avatar Nov 23 '16 17:11 sahildua2305

what should I write? This is an API request failure, this should only be temporary. {"errors": {}, "code_id": "6879d1z", "message": "OK", "run_status": {"status": "CE", "status_detail": "Correct the compilation/syntax errors."}, "compile_status": "Error code: 1200", "web_link":

btw how do I adapt the file, do i fork it and than make a pull request?

lawfets avatar Nov 23 '16 17:11 lawfets

what should I write?

Depends. Can we see what error message is returned from the API request. It may also be a timeout. You will need to investigate how we can check what caused an Ajax request to fail.

btw how do I adapt the file, do i fork it and than make a pull request?

Yes, right!

sahildua2305 avatar Nov 23 '16 17:11 sahildua2305

I don't think I can do anything at the moment as the original bug seems to be fixed and hacker earth has no bug with code_id": "6879d1z. So I cannot replicate any failures.

lawfets avatar Nov 23 '16 17:11 lawfets

I did find someone else with equal problem on github with a compiler but no answer there. https://github.com/codehimanshu/compiler/issues/4 also in connection with Hackerearth

lawfets avatar Nov 23 '16 18:11 lawfets

Is there anything I'm missing I should do to try to solve this issue

lawfets avatar Nov 24 '16 18:11 lawfets

@lawfets you need to do some search regarding what kind of response do we get when Ajax request fails. You will need to read a bit about Ajax for this. Accordingly, we can then handle the error cases.

sahildua2305 avatar Nov 24 '16 20:11 sahildua2305

I would be interested in working on this issue. Is this issue assigned to @lawfets ?

adi8 avatar Nov 26 '16 08:11 adi8

feel free to hop in adi8, I'm still in learning mode for AJAX so at the moment, nothing I can do

lawfets avatar Nov 26 '16 13:11 lawfets

Cool. I have a pretty good idea of what to do. Would like to know from @sahildua2305 what is exactly expected. You see I'm also new to open source projects.

adi8 avatar Nov 26 '16 13:11 adi8

@adi8 Check this issue - https://github.com/sahildua2305/hackIDE/issues/31#issuecomment-234212904

Should be an easy fix.

sahildua2305 avatar Nov 26 '16 14:11 sahildua2305

This issue is very difficult to replicate. Based on the info that I could gather on HackerEarth API documentation(https://www.hackerearth.com/docs/api/developers/code/legacy/) and the #31 issue I made some changes in javascript. I'll issue a pull request.

adi8 avatar Nov 27 '16 08:11 adi8

I am new to open source but I would like to contribute

Bilalharoon avatar Jul 27 '17 21:07 Bilalharoon

@sahildua2305 I want work on this issue it is not already solve.Should I take this up?

Nayan-Das avatar Oct 12 '18 16:10 Nayan-Das

I would like to work on this is this still open?

manavendrasen avatar Oct 02 '19 09:10 manavendrasen

Would like to work on this issue, is it still open?

MohammedBajuaifer avatar Sep 29 '20 14:09 MohammedBajuaifer

Yes, after staying on snooze for a while, it's up for grabs again.

sahildua2305 avatar Sep 29 '20 17:09 sahildua2305

@sahil865gupta can i look into this issue? Is this still valid one?

chandhu455 avatar Jan 30 '21 05:01 chandhu455

@sahildua2305 -- Is this issue still open ?

parimalakettymuthu avatar Apr 08 '22 10:04 parimalakettymuthu

is this open?

soham-sagade avatar Apr 09 '22 09:04 soham-sagade

Hello, is this issue still open? I am new to contributing and would love to take it on?

Sophyia7 avatar Sep 30 '22 17:09 Sophyia7

Is this issue solved?

0xClint avatar Oct 08 '22 17:10 0xClint