Commit 85589fe8 authored by Mustafa Gezen's avatar Mustafa Gezen
Browse files

Add messages to MBS exceptions and add gzip to prod webpack

parent 8a7e0771
......@@ -68,10 +68,9 @@ class MBSClient:
)
if r.status_code == 409:
raise MBSConflictException()
if r.status_code == 401:
raise MBSUnauthorizedException()
raise MBSConflictException("A MBS conflict occurred")
elif r.status_code == 401:
raise MBSUnauthorizedException("Not authorized")
data = r.json()
return data["id"]
......@@ -33,6 +33,7 @@
"carbon-components-react": "^7.27.0",
"carbon-icons": "^7.0.7",
"clean-webpack-plugin": "^3.0.0",
"compression-webpack-plugin": "^7.1.2",
"css-loader": "^5.0.1",
"html-webpack-plugin": "^4.5.1",
"postcss": "^8.2.9",
......
......@@ -25,6 +25,7 @@ const path = require('path');
const HtmlWebpackPlugin = require('html-webpack-plugin');
const { CleanWebpackPlugin } = require('clean-webpack-plugin');
const ReactRefreshWebpackPlugin = require('@pmmmwh/react-refresh-webpack-plugin');
const CompressionPlugin = require('compression-webpack-plugin');
const webpack = require('webpack');
const prod = process.env.NODE_ENV === 'production';
......@@ -53,6 +54,7 @@ module.exports = {
}),
dev && new webpack.HotModuleReplacementPlugin(),
dev && new ReactRefreshWebpackPlugin(),
dev && new CompressionPlugin(),
].filter(Boolean),
devServer: {
hot: true,
......
......@@ -2211,6 +2211,14 @@ compressible@~2.0.16:
dependencies:
mime-db ">= 1.43.0 < 2"
compression-webpack-plugin@^7.1.2:
version "7.1.2"
resolved "https://registry.yarnpkg.com/compression-webpack-plugin/-/compression-webpack-plugin-7.1.2.tgz#f9a1ba84d4879693e29726f6884b382940876597"
integrity sha512-9DKNW6ILLjx+bNBoviHDgLx6swBhWWH9ApClC9sTH2NoFfQM47BapQfovCm9zjD9v1uZwInF5a925FB9ErGQeQ==
dependencies:
schema-utils "^3.0.0"
serialize-javascript "^5.0.1"
compression@^1.7.4:
version "1.7.4"
resolved "https://registry.yarnpkg.com/compression/-/compression-1.7.4.tgz#95523eff170ca57c29a0ca41e6fe131f41e5bb8f"
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment