How to print error in web browser if there is error in code

0 votes

How to print error in web browser if there is an error in code. 

I am using IIS and if there is an error in code it gives error 502 in the web browser

Nov 6, 2020 in Python by anonymous
• 10,440 points
99 views

1 answer to this question.

0 votes

You can try to catch these errors and pass them as an HTTP response.

I would suggest you go through this: https://docs.djangoproject.com/en/3.1/howto/error-reporting/ 

answered Nov 6, 2020 by Gitika
• 65,870 points

Related Questions In Python

0 votes
1 answer

How to print a message or the error if a file is not found?

To print the message that file is not ...READ MORE

answered Jan 2, 2019 in Python by Omkar
• 69,130 points
262 views
+1 vote
1 answer

How to check if a string is null in python

Try this: if cookie and not cookie.isspace(): # the ...READ MORE

answered Aug 20, 2018 in Python by Priyaj
• 58,120 points
19,532 views
+1 vote
1 answer

How to print an error in Python?

For Python 2.6 and later and Python ...READ MORE

answered Aug 23, 2018 in Python by Priyaj
• 58,120 points
738 views
0 votes
1 answer

Is there a foreach function in python and is there a way to implement it if there isnt any

Every occurence of "foreach" I've seen (PHP, ...READ MORE

answered Aug 31, 2018 in Python by charlie_brown
• 7,780 points
293 views
+15 votes
2 answers

Git management technique when there are multiple customers and need multiple customization?

Consider this - In 'extended' Git-Flow, (Git-Multi-Flow, ...READ MORE

answered Mar 26, 2018 in DevOps & Agile by DragonLord999
• 8,450 points
1,064 views
+2 votes
1 answer
0 votes
1 answer
+1 vote
10 answers

How to fix this? ValueError: invalid literal for int() with base 10 error in Python

Just for the record: >>> int('55063.000000') Traceback (most recent ...READ MORE

answered Aug 17, 2020 in Python by pakainfo
• 200 points
262,953 views