# Test shows passed when there is error

**URL:** <https://forum.robotframework.org/t/test-shows-passed-when-there-is-error/7522>\
**Category:** Browser\
**Created:** [6 July 2024 12:18 UTC](https://forum.robotframework.org/t/test-shows-passed-when-there-is-error/7522 "2024-07-06T12:18:51Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Rhayes](https://avatars.discourse-cdn.com/v4/letter/r/ecae2f/32.png) [@Rhayes](https://forum.robotframework.org/u/Rhayes)\
**Post date:** [6 July 2024 12:18 UTC](https://forum.robotframework.org/t/test-shows-passed-when-there-is-error/7522/1 "2024-07-06T12:18:51Z")

</div>

I am running Browser Library test on mac.  
I have implemented api test but test passed even there is error.  
Test only fail for the Browser Library test when there is error.  
What should I configure so that python libraries that are not Browser library  
to return fail when there is error.

---

<div class="post-metadata">

**Author:** ![rasjani](https://avatars.discourse-cdn.com/v4/letter/r/858c86/32.png) [@rasjani](https://forum.robotframework.org/u/rasjani)\
**Post date:** [6 July 2024 13:02 UTC](https://forum.robotframework.org/t/test-shows-passed-when-there-is-error/7522/2 "2024-07-06T13:02:29Z")

</div>

Either:

1. Your python code should throw an exception in case of error or
2. it should return something and your rf code should check if the returned value(s) are what they should be and if not, use `Fail` keyword …

---

<div class="post-metadata">

**Author:** ![Rhayes](https://avatars.discourse-cdn.com/v4/letter/r/ecae2f/32.png) [@Rhayes](https://forum.robotframework.org/u/Rhayes)\
**Post date:** [6 July 2024 19:50 UTC](https://forum.robotframework.org/t/test-shows-passed-when-there-is-error/7522/3 "2024-07-06T19:50:04Z")

</div>

Thanks  
Got it working now.  
You are right, after debugging I found out that  
python exception was not execute.
