Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve invalid CSS/SCSS error handling #6

Closed
f1yn opened this issue Apr 18, 2020 · 0 comments
Closed

Improve invalid CSS/SCSS error handling #6

f1yn opened this issue Apr 18, 2020 · 0 comments
Assignees

Comments

@f1yn
Copy link
Member

f1yn commented Apr 18, 2020

Right now, any invalid Sass in styles will dump something like this to stderr:

Saving {campaignName}/_core/global.scss(node:54061) UnhandledPromiseRejectionWarning: StatusCodeError: 400 - {"status":400,"time":"2020-04-18T01:17:30.510Z","errors":[{"code":"invalid syntax","status":400,"message":"Sass error: \"Invalid CSS after \"}\": expected 1 selector or at-rule, was \".profilelist. .pagi\"\"","detail":"One or more of the values you sent was not of the correct syntax. Please check the format of the values you are sending.","title":"Invalid Syntax"}]}
    at new StatusCodeError (/Users/flynn/.nvm/versions/node/v12.13.1/lib/node_modules/@raisely/cli/node_modules/request-promise-core/lib/errors.js:32:15)
    at Request.plumbing.callback (/Users/flynn/.nvm/versions/node/v12.13.1/lib/node_modules/@raisely/cli/node_modules/request-promise-core/lib/plumbing.js:104:33)
    at Request.RP$callback [as _callback] (/Users/flynn/.nvm/versions/node/v12.13.1/lib/node_modules/@raisely/cli/node_modules/request-promise-core/lib/plumbing.js:46:31)
    at Request.self.callback (/Users/flynn/.nvm/versions/node/v12.13.1/lib/node_modules/@raisely/cli/node_modules/request/request.js:185:22)
    at Request.emit (events.js:210:5)
    at Request.EventEmitter.emit (domain.js:475:20)
    at Request.<anonymous> (/Users/flynn/.nvm/versions/node/v12.13.1/lib/node_modules/@raisely/cli/node_modules/request/request.js:1154:10)
    at Request.emit (events.js:210:5)
    at Request.EventEmitter.emit (domain.js:475:20)
    at IncomingMessage.<anonymous> (/Users/flynn/.nvm/versions/node/v12.13.1/lib/node_modules/@raisely/cli/node_modules/request/request.js:1076:12)
(node:54061) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)
(node:54061) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
⠇ Saving {campaignName}/_core/global.scss(node:54061) UnhandledPromiseRejectionWarning: StatusCodeError: 400 - {"status":400,"time":"2020-04-18T01:17:55.817Z","errors":[{"code":"invalid syntax","status":400,"message":"Sass error: \"Invalid CSS after \"}\": expected 1 selector or at-rule, was \".profilelist. .pagi\"\"","detail":"One or more of the values you sent was not of the correct syntax. Please check the format of the values you are sending.","title":"Invalid Syntax"}]}
    at new StatusCodeError (/Users/flynn/.nvm/versions/node/v12.13.1/lib/node_modules/@raisely

This should be cleaned up to only show the Sass error for this specific function. Otherwise, all stderr traces should be hidden behind a debug or verbose flag.

@f1yn f1yn changed the title Improve invalid CSS error handling Improve invalid CSS/SCSS error handling Apr 18, 2020
@f1yn f1yn self-assigned this Apr 18, 2020
@f1yn f1yn closed this as completed Apr 20, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant