cloudendpoints / endpoints-python

A Python framework for building RESTful APIs on Google App Engine
Apache License 2.0
51 stars 17 forks source link

protorpc rewrites all 40x errors to 400 #138

Open inklesspen opened 6 years ago

inklesspen commented 6 years ago

Raising an exception such as endpoints.api_exceptions.NotFoundException ought to result in an error with http status code 404, but protorpc detects it as a subclass of protorpc.remote.ApplicationError and sends 400 instead.

inklesspen commented 6 years ago

https://github.com/google/protorpc/blob/95849c9a3e414b9ba2d3da91fd850156348fe558/protorpc/wsgi/service.py#L184

dgaedcke commented 6 years ago

is anyone going to fix this? makes it quite hard to debug problems before it even hits our code

inklesspen commented 6 years ago

ProtoRPC is not actively maintained, and was never intended to be used for this use case anyway, but I will fix it if I can figure out a way.