mirror of
https://github.com/strapi/strapi.git
synced 2025-11-04 03:43:34 +00:00
ML: Display proper error message thrown by the API
This commit is contained in:
parent
710a39fc0d
commit
bd3e82c368
@ -100,7 +100,10 @@ export const UploadingAssetCard = ({ asset, onCancel, onStatusChange, addUploade
|
||||
</Card>
|
||||
{error ? (
|
||||
<Typography variant="pi" fontWeight="bold" textColor="danger600">
|
||||
{error.message}
|
||||
{formatMessage({
|
||||
id: getTrad(`apiError.${error.response.data.error.message}`),
|
||||
defaultMessage: error.response.data.error.message,
|
||||
})}
|
||||
</Typography>
|
||||
) : (
|
||||
undefined
|
||||
|
||||
@ -1,4 +1,5 @@
|
||||
{
|
||||
"apiError.FileTooBig": "The uploaded file exceeds the maximum allowed asset size.",
|
||||
"bulk.select.label": "Select all assets",
|
||||
"button.next": "Next",
|
||||
"checkControl.crop-duplicate": "Duplicate & crop the asset",
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user