mirror of
https://github.com/strapi/strapi.git
synced 2025-11-11 07:39:16 +00:00
change error handling
This commit is contained in:
parent
a201021ca5
commit
28a4704210
@ -183,18 +183,8 @@ class RemoteStrapiDestinationProvider implements IDestinationProvider {
|
|||||||
});
|
});
|
||||||
|
|
||||||
server.once('error', (err) => {
|
server.once('error', (err) => {
|
||||||
if (err.message === 'Unexpected server response: 401') {
|
|
||||||
reject(
|
reject(
|
||||||
new ProviderValidationError('Invalid Transfer Token', {
|
new ProviderTransferError(err.message, {
|
||||||
check: 'auth.token',
|
|
||||||
details: {
|
|
||||||
error: err.message,
|
|
||||||
},
|
|
||||||
})
|
|
||||||
);
|
|
||||||
}
|
|
||||||
reject(
|
|
||||||
new ProviderTransferError('Error connecting to server', {
|
|
||||||
details: {
|
details: {
|
||||||
error: err.message,
|
error: err.message,
|
||||||
},
|
},
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user