Code Monkey home page Code Monkey logo

Comments (12)

bramhoven avatar bramhoven commented on May 14, 2024 1

Ah ofcourse! Did not even notice that haha. I could also submit a PR to update the error message if you are busy with other stuff
Really like bruno so far, keep the progress going!

from bruno.

helloanoop avatar helloanoop commented on May 14, 2024 1

@bramhoven That'd be awesome.

Here is the guide to get started and bring bruno on your local

To save you some time, here is where the generic error message is being thrown and here the error gets thrown

I have some code already baked in to implement generic error handling. Its here

The way I would approach this it throw a BrunoError in workspaces actions, and then have the DeleteWorkspace use the toastError

I also, think it'd be good to update toastError to support a default error

export const toastError = (error, defaultErrorMsg = 'An error occurred') => {
  if (error instanceof BrunoError) {
    if (error.level === 'warning') {
      return toast(error.message, {
        icon: '⚠️',
        duration: 3000
      });
    }
    return toast.error(error.message, {
      duration: 3000
    });
  }

  return toast.error(error.message || defaultError);

from bruno.

bramhoven avatar bramhoven commented on May 14, 2024 1

Cool! Tested it and it seems to work 😁

from bruno.

helloanoop avatar helloanoop commented on May 14, 2024 1

@bramhoven Release v0.2.0 with your fixes is out. Thanks again for the work on this.
You can download the latest versions at https://www.usebruno.com/downloads

In case you love dark more, its included in the v0.2.0 release
Currently its based on vscode dark theme, but plan to support custom themes in the near future.

from bruno.

helloanoop avatar helloanoop commented on May 14, 2024

@bramhoven You cannot delete the workspace that is currently open

In order to delete it, you can switch to another workspace and the delete it.

This feedback helps. I will update the error messaging to indicate this.

The project is very early.
@bramhoven Thanks so much for trying it. Please feel free to submit issues / feature requests that bruno needs to do solve your uses cases.

from bruno.

bramhoven avatar bramhoven commented on May 14, 2024

Trying to run bruno, but getting this error.

bruno on  feature/improve-error-workspace-deletion via  v14.17.0 
❯ npm run dev:web

> usebruno@ dev:web C:\workspaces\bruno
> npm run dev --workspace=packages/bruno-app

npm ERR! missing script: dev

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\bram.hoven\AppData\Roaming\npm-cache\_logs\2022-10-21T15_01_03_235Z-debug.log
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! usebruno@ dev:web: `npm run dev --workspace=packages/bruno-app`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the usebruno@ dev:web script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\bram.hoven\AppData\Roaming\npm-cache\_logs\2022-10-21T15_01_03_278Z-debug.log

Currently the scripts in package.json are:

"scripts": {
  "dev:web": "npm run dev --workspace=packages/bruno-app",
  "build:web": "npm run build --workspace=packages/bruno-app",
  "dev:electron": "npm run dev --workspace=packages/bruno-electron",
  "build:chrome-extension": "./scripts/build-chrome-extension.sh",
  "build:electron": "./scripts/build-electron.sh"
}

So it is missing the dev script required to run npm run dev --workspace=packages/bruno-app

from bruno.

helloanoop avatar helloanoop commented on May 14, 2024

Hmm.. strange..
Can you check if the npm version is 8.x
This error is common in older npm versions that do not support workspaces

If the issue still persists, then for now, you can

cd packages/bruno-app
npm run dev

from bruno.

bramhoven avatar bramhoven commented on May 14, 2024

I was running version 6.14. I am upgrading now. Thanks for the quick response!

from bruno.

bramhoven avatar bramhoven commented on May 14, 2024

@helloanoop I created PR #39. If you have the time let me know what you think about it!
I also added that the error messages is gotten through the parseError method since that seemed specifically made for getting the correct message from an error.

from bruno.

helloanoop avatar helloanoop commented on May 14, 2024

Merged !
Thanks for this @bramhoven !

The fix should be deployed in the web version https://play.usebruno.com/ in the next couple of min.
Will be cutting a desktop release with these fixes tomorrow.

from bruno.

bramhoven avatar bramhoven commented on May 14, 2024

Great! I did see the Vercel build had failed... I was not able to see why it had failed though

from bruno.

helloanoop avatar helloanoop commented on May 14, 2024

Yup. Some deployment config got updated in the vercel settings.
This is fixed now. The latest build is now deployed to https://play.usebruno.com

from bruno.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.