Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to show SpreadSheet Error details? #21

Open
azu opened this issue Mar 12, 2021 · 0 comments
Open

How to show SpreadSheet Error details? #21

azu opened this issue Mar 12, 2021 · 0 comments
Labels
Status: Proposal Request for comments

Comments

@azu
Copy link
Owner

azu commented Mar 12, 2021

philan.net should allow the user to own spreadsheet error.

/api/spreadsheet/get does many parse. so it may occur error.

items: rowDate
.filter((row) => {
const values = row.values;
return (
values?.[0].userEnteredValue?.stringValue &&
values?.[1].userEnteredValue?.stringValue &&
values?.[2]?.formattedValue!
);
})
?.map((row) => {
const values = row.values;
const dateString = values?.[0].userEnteredValue?.stringValue!;
const amountUserEnteredValue = values?.[2].userEnteredValue?.formulaValue;
const amountNumber = values?.[2].effectiveValue?.numberValue!;
const amountFormattedValue = values?.[2]?.formattedValue!;
const url = values?.[3].userEnteredValue?.stringValue!;
const id = createItemId({
dateString,
amountNumber,
url
});
const meta = JSON.parse(values?.[5]?.userEnteredValue?.stringValue ?? "{}");
const parsedAmount = parseAmount(amountUserEnteredValue ?? amountNumber, defaultCurrency);
return {
id,
date: dateString,
to: values?.[1].userEnteredValue?.stringValue!,
amount: {
number: amountNumber,
value: amountFormattedValue,
raw: parsedAmount.amount,
inputCurrency: parsedAmount.from,
outputCurrency: parsedAmount.to
},
url: url,
memo: values?.[4].userEnteredValue?.stringValue ?? "",
meta: meta
};

This debug feature is needed for users.

@azu azu added the Status: Proposal Request for comments label Mar 12, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status: Proposal Request for comments
Projects
None yet
Development

No branches or pull requests

1 participant