mirror of
https://github.com/strapi/strapi.git
synced 2025-11-02 19:04:38 +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) => {
|
||||
if (err.message === 'Unexpected server response: 401') {
|
||||
reject(
|
||||
new ProviderValidationError('Invalid Transfer Token', {
|
||||
check: 'auth.token',
|
||||
details: {
|
||||
error: err.message,
|
||||
},
|
||||
})
|
||||
);
|
||||
}
|
||||
reject(
|
||||
new ProviderTransferError('Error connecting to server', {
|
||||
new ProviderTransferError(err.message, {
|
||||
details: {
|
||||
error: err.message,
|
||||
},
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user