candis icon indicating copy to clipboard operation
candis copied to clipboard

Remove backend 404 error showing up on console when creating a new pipeline.

Open rupav opened this issue 6 years ago • 2 comments

Expected Behaviour

If new pipe's name doesn't match with any existing, backend read api error should not be reflected back in the console.

Actual Behaviour

Currently, while creating a new pipeline, we check if pipeline with the same name if already present, if not we create it. But if there is no match, a error is caught for the read request to backend, which gets shown up as 404 error in the console.

Steps to Reproduce:

Create a new pipeline with a new name, and see your console.

rupav avatar Jul 15 '18 19:07 rupav

Hi @rupav I have tried to work on this issue. I did two things to handle the situation here.

  1. from what I understood after going through the code, the main concern here is that "404" error response by the server is also popping up a corresponding browser console error.

  2. SO what I did instead is, instead of setting 404 error, I added a text "Filename doesnot exist" in data.py file. The status code hence gets automatically set to 200.

  3. next in bundle.min.js, under "success" checking, I also put a check for "Filename doesnot exist" check and then call the api.data.write route via dispatch action method. I am not sure if this should be the correct way but let me know what you think.

pic2 pic2

majumderS avatar Feb 26 '19 14:02 majumderS

Hi @majumderS If you edit the bundle.min.js file, it would gets restored to original in the next build command, so that's not a solution, instead you need to add it in the source code. "Filename doesnot exist" response can work, but why should we show this to the console/(user)?

rupav avatar Mar 10 '19 09:03 rupav