mirror of
https://github.com/gnh1201/welsonjs.git
synced 2025-09-18 15:48:58 +00:00
updated pr-agent best practices with auto analysis
parent
af4ac053d8
commit
16706edcd6
|
@ -1,3 +1,45 @@
|
|||
<!-- PR --><table><tr><td> <b><a href='https://github.com/gnh1201/welsonjs/pull/309#issuecomment-3172799544'>PR 309</a></b> (2025-08-10)
|
||||
|
||||
</td></tr></table>
|
||||
|
||||
|
||||
|
||||
<!-- suggestion --><details><summary>[general] Return structured error on failure</summary>
|
||||
|
||||
___
|
||||
|
||||
✅ Return structured error on failure
|
||||
|
||||
**Preserve error context in the response to allow callers to detect failures instead of returning an indistinguishable empty object. Include an error flag and message so downstream logic can branch appropriately.**
|
||||
|
||||
[lib/chrome.js [452-455]](https://github.com/gnh1201/welsonjs/pull/309/files#diff-868ee66369a322a75a321ede18241bfb18f199a9e5bb5371d4d049f0af14f598R452-R455)
|
||||
|
||||
```diff
|
||||
} catch (e) {
|
||||
console.warn(e.message);
|
||||
- response = {};
|
||||
+ response = { error: true, message: e && e.message ? e.message : "Request failed" };
|
||||
}
|
||||
```
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Suggestion importance[1-10]: 7
|
||||
|
||||
__
|
||||
|
||||
Why: This suggestion improves the function's API by returning a structured error object instead of an empty one, which allows callers to more easily detect and handle failures.
|
||||
|
||||
___
|
||||
|
||||
</details>
|
||||
|
||||
___
|
||||
|
||||
|
||||
|
||||
<!-- PR --><table><tr><td> <b><a href='https://github.com/gnh1201/welsonjs/pull/307#issuecomment-3154116053'>PR 307</a></b> (2025-08-05)
|
||||
|
||||
</td></tr></table>
|
||||
|
@ -87,6 +129,8 @@ ___
|
|||
|
||||
|
||||
|
||||
|
||||
|
||||
<!-- PR --><table><tr><td> <b><a href='3055522397'>PR 284</a></b> (2025-07-10)
|
||||
|
||||
</td></tr></table>
|
||||
|
@ -155,6 +199,8 @@ ___
|
|||
|
||||
|
||||
|
||||
|
||||
|
||||
<!-- PR --><table><tr><td> <b><a href='3006712754'>PR 279</a></b> (2025-06-26)
|
||||
|
||||
</td></tr></table>
|
||||
|
@ -205,6 +251,8 @@ ___
|
|||
|
||||
|
||||
|
||||
|
||||
|
||||
<!-- PR --><table><tr><td> <b><a href='2982794401'>PR 276</a></b> (2025-06-18)
|
||||
|
||||
</td></tr></table>
|
||||
|
@ -252,6 +300,8 @@ ___
|
|||
|
||||
|
||||
|
||||
|
||||
|
||||
<!-- PR --><table><tr><td> <b><a href='2953770469'>PR 272</a></b> (2025-06-08)
|
||||
|
||||
</td></tr></table>
|
||||
|
@ -309,6 +359,8 @@ ___
|
|||
|
||||
|
||||
|
||||
|
||||
|
||||
<!-- PR --><table><tr><td> <b><a href='2868572186'>PR 249</a></b> (2025-05-10)
|
||||
|
||||
</td></tr></table>
|
||||
|
@ -377,6 +429,8 @@ ___
|
|||
|
||||
|
||||
|
||||
|
||||
|
||||
<!-- PR --><table><tr><td> <b><a href='2868568893'>PR 248</a></b> (2025-05-10)
|
||||
|
||||
</td></tr></table>
|
||||
|
@ -502,6 +556,8 @@ ___
|
|||
|
||||
|
||||
|
||||
|
||||
|
||||
<!-- PR --><table><tr><td> <b><a href='2850302530'>PR 245</a></b> (2025-05-05)
|
||||
|
||||
</td></tr></table>
|
||||
|
@ -596,6 +652,8 @@ ___
|
|||
|
||||
|
||||
|
||||
|
||||
|
||||
<!-- PR --><table><tr><td> <b><a href='2832883684'>PR 242</a></b> (2025-04-27)
|
||||
|
||||
</td></tr></table>
|
||||
|
|
Loading…
Reference in New Issue
Block a user