ionic-team / capacitor

Build cross-platform Native Progressive Web Apps for iOS, Android, and the Web ⚡️
https://capacitorjs.com
MIT License
11.67k stars 989 forks source link

[Bug]: Plugin error return both 'errorMessage' and 'error' #7554

Closed JingLeiTalan closed 3 weeks ago

JingLeiTalan commented 1 month ago

Capacitor Version

When use call.reject(error) in custom plugin, the plugin js result which contains 'errorMessage' and 'message', the content are the same,

After checked, seems like in the JS.swift : image

How can we only return the result which can be parsed more clearly at ionic side ?

Other API Details

No response

Platforms Affected

Current Behavior

JS error rertun an json with errorMessage and message

Expected Behavior

JS error return what be defined in the call.reject()

Project Reproduction

no

Additional Information

No response

ionitron-bot[bot] commented 1 month ago

This issue needs more information before it can be addressed. In particular, the reporter needs to provide a minimal sample app that demonstrates the issue. If no sample app is provided within 15 days, the issue will be closed. Please see the Contributing Guide for how to create a Sample App. Thanks! Ionitron 💙

Ionitron commented 3 weeks ago

It looks like this issue didn't get the information it needed, so I'll close it for now. If I made a mistake, sorry! I am just a bot.

Have a great day! Ionitron 💙