Failed to execute 'setItem' on 'Storage'

Hello. I get this error:

Unhandled Rejection (QuotaExceededError): Failed to execute ‘setItem’ on ‘Storage’: Setting the value of ‘_cap_UltimosProveedores’ exceeded the quota.

this is how setItem is implemented:

export async function setItem(key: string, value: any) {
  await Storage.set({
    key: key,
    value: value
  });
}

Is there a way to avoid this error and clean what is in the local storage when the limit is reached?

Regarding LocalStorage size: There is a way to avoid it? or there is a way to increase it to x size? or there