mirror of
https://github.com/strapi/strapi.git
synced 2025-11-15 17:49:57 +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>
|
</Card>
|
||||||
{error ? (
|
{error ? (
|
||||||
<Typography variant="pi" fontWeight="bold" textColor="danger600">
|
<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>
|
</Typography>
|
||||||
) : (
|
) : (
|
||||||
undefined
|
undefined
|
||||||
|
|||||||
@ -1,4 +1,5 @@
|
|||||||
{
|
{
|
||||||
|
"apiError.FileTooBig": "The uploaded file exceeds the maximum allowed asset size.",
|
||||||
"bulk.select.label": "Select all assets",
|
"bulk.select.label": "Select all assets",
|
||||||
"button.next": "Next",
|
"button.next": "Next",
|
||||||
"checkControl.crop-duplicate": "Duplicate & crop the asset",
|
"checkControl.crop-duplicate": "Duplicate & crop the asset",
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user