Ghost
New
flaxo
/
ghost
public
forked from
ghost/ghost
Source code of Ghost - On Ghost
Star
0
Fork
0
Code
Issues
0
Pull requests
0
1e911c3
34
branches
Go to file
t
Code
ghost
apps
api
src
lib
storage
storage.errors.ts
allow attaching assets to releases
448f855
16 days ago
14 lines · 489 B
1
import
{
HttpStatus
}
from
'
@nestjs/common
'
;
2
3
import
{
DomainError
}
4
import
{
formatByteSize
}
5
6
export
class
StorageQuotaExceededError
7
status
:
number
8
9
constructor
(
used
:
10
super
(
11
`
Storage quota exceeded:
${
formatByteSize
(
used
12
)
;
13
}
14
}
from
'
../../domain/errors.js
'
;
from
'
./byte-size.js
'
;
extends
DomainError
{
=
HttpStatus
.
PAYLOAD_TOO_LARGE
;
number
,
quota
:
number
,
requested
:
number
)
{
)
}
of
${
formatByteSize
(
quota
)
}
used, and this file needs
${
formatByteSize
(
requested
)
}
`
,