Skip to content
This repository has been archived by the owner on Feb 9, 2023. It is now read-only.

Add custom error message for invalid YAML #34

Closed
alita-moore opened this issue Dec 1, 2021 · 15 comments
Closed

Add custom error message for invalid YAML #34

alita-moore opened this issue Dec 1, 2021 · 15 comments
Labels
bug Something isn't working priority: low

Comments

@alita-moore
Copy link
Contributor

ethereum/EIPs#4512 (comment)

@alita-moore
Copy link
Contributor Author

just or reference, this is a feature requested by myself and it's low priority

@Pandapip1
Copy link
Member

@alita-moore could you elaborate since you're no longer actively maintaining this?

@alita-moore
Copy link
Contributor Author

@alita-moore could you elaborate since you're no longer actively maintaining this?

It's just to add a better error for the linked error

@JEAlfonsoP
Copy link
Contributor

I believe this is the error example:

A critical exception has occurred (cc @alita-moore):
Message: can not read a block mapping entry; a multiline key may not be an implicit key at line 3, column 7:
author: kkimos [email protected]
^

Pandapip1: Has you seen this error again lately ?
I think EIPW fixs this kind of string miss-formatting? (question)

@Pandapip1
Copy link
Member

I have seen it once. I can't remember where.

@Pandapip1 Pandapip1 changed the title [Feature / bug] add exception handling for the car of an unknown field Add exception handling for the car of an unknown field Sep 3, 2022
@JEAlfonsoP
Copy link
Contributor

I will take a look on it, but the "bug" was wrong or poor error messaging for author's ID (wrong github and/or email formatting) in the EIP header.
I will review the EIP-Bot and EIPW code but I think this has been solved with EIPW.

@Pandapip1
Copy link
Member

This has not been solved with eipw. This is an EIP-Bot bug.

@JEAlfonsoP
Copy link
Contributor

Do you have any particular idea about the writing for this error message: ??

@JEAlfonsoP
Copy link
Contributor

@Pandapip1 ^

@Pandapip1
Copy link
Member

No, I don't

@SamWilsn
Copy link

SamWilsn commented Sep 7, 2022

I'm not looking at this one.

@JEAlfonsoP
Copy link
Contributor

I have reviewed all assertion and require files corresponding to this kind of error (bad formatting in the EIP header - specifically authors) and looks like the error message was properly edited also the editing time of the EIP-Bot repo vs the time the error was commented suggests it was probably fixed.
I will try to create a test case for it and will get back either suggesting to close this issue or with a PR about it.

@JEAlfonsoP
Copy link
Contributor

Hi, I performed a test case for this error, this is the report:
This error is thrown by Auto Label Bot.
https://github.com/JEAlfonsoP/EIPs/actions/runs/3071036422/jobs/4961365805

YAMLException: can not read a block mapping entry; a multiline key may not be an implicit key at line 3, column 7:
author: kimos [email protected]
^
at generateError (/home/runner/work/_actions/Pandapip1/jekyll-label-action/28a89dbbef321fceaf3cff17f4d29c7a033c3d56/dist/index.js:10296:14)
at throwError (/home/runner/work/_actions/Pandapip1/jekyll-label-action/28a89dbbef321fceaf3cff17f4d29c7a033c3d56/dist/index.js:10302:13)
at readBlockMapping (/home/runner/work/_actions/Pandapip1/jekyll-label-action/28a89dbbef321fceaf3cff17f4d29c7a033c3d56/dist/index.js:10904:13)
at composeNode (/home/runner/work/_actions/Pandapip1/jekyll-label-action/28a89dbbef321fceaf3cff17f4d29c7a033c3d56/dist/index.js:11102:82)
at readDocument (/home/runner/work/_actions/Pandapip1/jekyll-label-action/28a89dbbef321fceaf3cff17f4d29c7a033c3d56/dist/index.js:11220:7)
at loadDocuments (/home/runner/work/_actions/Pandapip1/jekyll-label-action/28a89dbbef321fceaf3cff17f4d29c7a033c3d56/dist/index.js:11262:9)
at load (/home/runner/work/_actions/Pandapip1/jekyll-label-action/28a89dbbef321fceaf3cff17f4d29c7a033c3d56/dist/index.js:11280:23)
at safeLoad (/home/runner/work/_actions/Pandapip1/jekyll-label-action/28a89dbbef321fceaf3cff17f4d29c7a033c3d56/dist/index.js:11296:14)
at parse2 (/home/runner/work/_actions/Pandapip1/jekyll-label-action/28a89dbbef321fceaf3cff17f4d29c7a033c3d56/dist/index.js:11956:24)
at extractor (/home/runner/work/_actions/Pandapip1/jekyll-label-action/28a89dbbef321fceaf3cff17f4d29c7a033c3d56/dist/index.js:11923:16)

I do not see any problem with this, since there is an error. If you want to change the message in :
https://github.com/Pandapip1/jekyll-label-action/blob/28a89dbbef321fceaf3cff17f4d29c7a033c3d56/dist/index.js
Line 10904: throwError(state, "can not read a block mapping entry; a multiline key may not be an implicit key");
for another message is up to Editors.

Please let me know if you need something else in order to close this issue. So I can move forward for the next one. Ty.

@Pandapip1
Copy link
Member

Pandapip1 commented Sep 18, 2022

Ah - I suggest perhaps the following error:

The preamble is invalid. Please double-check the YAML syntax.

@Pandapip1 Pandapip1 changed the title Add exception handling for the car of an unknown field Add custom error message for invalid YAML Sep 18, 2022
@Pandapip1 Pandapip1 added bug Something isn't working and removed enhancement New feature or request labels Sep 18, 2022
JEAlfonsoP added a commit to JEAlfonsoP/jekyll-label-action that referenced this issue Sep 18, 2022
This will fix:
ethereum/EIP-Bot#34


Signed-off-by: Jose Alfonso <[email protected]>
@JEAlfonsoP
Copy link
Contributor

Pandapip1 pushed a commit to Pandapip1/jekyll-label-action that referenced this issue Sep 19, 2022
This will fix:
ethereum/EIP-Bot#34


Signed-off-by: Jose Alfonso <[email protected]>

Signed-off-by: Jose Alfonso <[email protected]>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working priority: low
Projects
None yet
Development

No branches or pull requests

4 participants