Error Not Showing properly

I am using erpnext 7.2 version, but when I am trying to build REST API it is not showing python syntax errors(indentation error or ‘:’ missing errors). In fact showing 404 invalid method.

For Rest API check this REST API[quote=“dpratham, post:1, topic:23850”]
it is not showing python syntax
[/quote]

More detail will be helpful.

I have written REST API, when I try to execute it, the indentation error or any other syntax errors are not showing instead of that it gives 404 invalid method.

url=http://192.168.1.243/api/method/erpnext.medusense.Prathamesh.TestAPI

Code:
@frappe.whitelist(allow_guest=True)
def TestAPI():
a=
frappe.msgprint(“Hii”)

Output:

404 Not Found

Not Found

Invalid method

Instead of this output, it should give invalid syntax. Due to this I am unable to find exact location of error.

Check indentation in your python method

Seems like entered Incorrect URL, on which port your running the setup

It should be like
http://192.168.1.243:8000/api/method/{dotted.path.to.function}
assuming your port 8000

Make sure you entered correct path. Also, return something to check.

e.g

@frappe.whitelist(allow_guest=True)
def TestAPI():
  return 'Success'

Refer REST API for details

No My URL is correct. If I correct the code then it is giving me correct output. I am asking you why this is not showing me exact error type and line number??? As earlier version is able to give me exact error type and line number.