law-common 10.72.19 → 10.72.20
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.fileFormatConfig = exports.FileFormatEnum = void 0;
|
|
4
4
|
const error_key_enum_1 = require("../../enums/error.key.enum");
|
|
5
|
+
const app_badrequest_exception_1 = require("../../exceptions/impl/app-badrequest.exception");
|
|
5
6
|
var FileFormatEnum;
|
|
6
7
|
(function (FileFormatEnum) {
|
|
7
8
|
FileFormatEnum["PDF"] = "application/pdf";
|
|
@@ -56,7 +57,10 @@ exports.fileFormatConfig = {
|
|
|
56
57
|
function defaultSize(format) {
|
|
57
58
|
const size = FileFormatEnum.sizeMap.get(format);
|
|
58
59
|
if (size === undefined) {
|
|
59
|
-
throw new
|
|
60
|
+
throw new app_badrequest_exception_1.AppBadRequestException({
|
|
61
|
+
key: error_key_enum_1.ErrorKeyEnum.DEFAULT_SIZE,
|
|
62
|
+
message: [`No default size set for format: ${format}`],
|
|
63
|
+
});
|
|
60
64
|
}
|
|
61
65
|
return size;
|
|
62
66
|
}
|