mirror of
https://github.com/logto-io/logto.git
synced 2024-12-30 20:33:54 -05:00
chore(core): show errors of storage provider (#5240)
This commit is contained in:
parent
2260eb01cc
commit
c9117515aa
1 changed files with 3 additions and 1 deletions
|
@ -15,6 +15,7 @@ import RequestError from '#src/errors/RequestError/index.js';
|
|||
import koaGuard from '#src/middleware/koa-guard.js';
|
||||
import SystemContext from '#src/tenants/SystemContext.js';
|
||||
import assertThat from '#src/utils/assert-that.js';
|
||||
import { consoleLog } from '#src/utils/console.js';
|
||||
import { uploadFileGuard } from '#src/utils/storage/consts.js';
|
||||
import { buildUploadFile } from '#src/utils/storage/index.js';
|
||||
import { getTenantId } from '#src/utils/tenant.js';
|
||||
|
@ -86,7 +87,8 @@ export default function userAssetsRoutes<T extends AuthedRouter>(...[router]: Ro
|
|||
};
|
||||
|
||||
ctx.body = result;
|
||||
} catch {
|
||||
} catch (error: unknown) {
|
||||
consoleLog.error(error);
|
||||
throw new RequestError({
|
||||
code: 'storage.upload_error',
|
||||
status: 500,
|
||||
|
|
Loading…
Reference in a new issue