Comments (3)
So I found out what causes this, but didn't get a satisfactory answer.
handle500
is set to this: https://github.com/mozilla/olympia/blob/master/apps/amo/views.py#L112-L117
Which looks to see if it starts with /api/
and then bounces you over to /apps/api/
which returns XML because the main API on olympia is version check and block list. Change this at your peril.
So the next obvious thing to do is override the exception handler in DRF: http://www.django-rest-framework.org/api-guide/exceptions/, but if you do that and its a 500, nothing gets sent to sentry. So then if you try to add in sentry logging in the exception handler, you'll note that you don't actually get the request.
So then I thought I'd just change the handler500
in /apps/api/
and we can do that by simply checking request.path_info.startswith('/api/v3/')
, but then ideally you want to create a Response that adapts to the Accept headers sent by the client. Which a standard rest framework Response won't do.
At that point I headed for a beer. There's probably something simple here I'm missing.
from addons.
Duplicate of #3137, but it looks like @diox is working on that one 👍
from addons.
Ah yeah, had not seen your issue. I'll look into playing with the DRF exception handler, I did that in Marketplace and had the request working : https://github.com/mozilla/zamboni/blob/master/mkt/api/exceptions.py#L38
from addons.
Related Issues (20)
- [Bug]: All the screenshot addons lately are causing the Save as window Button, not to display properly, we are unable to save images in our PC folders HOT 1
- [Bug]: TranslationSerializerField represented as string in swagger schema, though it requires a dicitonary input HOT 2
- [Bug]: Show "Request was throttled ..." instead of "An unexpected error occured" for the abuse reports addon endpoint HOT 1
- [Bug]: Sort reviewers theme queue by target date HOT 1
- [Bug]: 500 server errors on some sorting options in rev tools HOT 4
- Porn link in a review
- [Bug]: No hola vpn what is going on? HOT 1
- [Bug]: dev deploys don't seem to be working HOT 1
- [Task]: Ensure commit/tag we deploy matches what we intended to deploy HOT 2
- [Bug]: An admin can send patch requests for eula/privacy policies for extensions they don't own HOT 5
- [Bug]: Readme point to old install docker link
- [Bug]: Escalated appeals from Cinder - could have a different icon? HOT 1
- [Bug]: API responds with `is_disabled_by_mozilla` set to `false` for add-on which is effectively disabled by Mozilla HOT 2
- [Task]: Re-create the cinder job on receiving AMO_ESCALATE decision HOT 1
- [Task]: Filter themes by color HOT 3
- [Bug]: make up is too slow and janky
- [Task]: Deny URLs in add-on ratings HOT 3
- [Task]: Add new sentence to the email template for unlisted auto-approved rejections HOT 3
- [Task]: implement support for cinder's create report webhook HOT 1
- [Task]: Suggestions regarding licensing at AMO HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from addons.