mirror of
https://github.com/strapi/strapi.git
synced 2026-01-05 03:38:09 +00:00
Add more specific error
This commit is contained in:
parent
721b3e586c
commit
cc3d292f0e
@ -16,6 +16,7 @@ import type {
|
||||
Stream,
|
||||
} from '../../../../types';
|
||||
import { createFilePathFactory, createTarEntryStream } from './utils';
|
||||
import { ProviderTransferError } from '../../../errors/providers';
|
||||
|
||||
export interface ILocalFileDestinationProviderOptions {
|
||||
encryption: {
|
||||
@ -103,7 +104,9 @@ class LocalFileDestinationProvider implements IDestinationProvider {
|
||||
|
||||
outStream.on('error', (err: NodeJS.ErrnoException) => {
|
||||
if (err.code === 'ENOSPC') {
|
||||
throw new Error("Your server doesn't have space to proceed with the import.");
|
||||
throw new ProviderTransferError(
|
||||
"Your server doesn't have space to proceed with the import."
|
||||
);
|
||||
}
|
||||
throw err;
|
||||
});
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user