-
Notifications
You must be signed in to change notification settings - Fork 68
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Airbrake: unexpected code (405). Body: Method Not Allowed #80
Labels
Comments
kyrylo
added a commit
that referenced
this issue
Jun 3, 2016
Fixes #80 (Airbrake: unexpected code (405). Body: Method Not Allowed) and many other complains of people who are confused by the current behaviour when we raise an error when they ignore current environment.
kyrylo
added a commit
that referenced
this issue
Jun 3, 2016
Fixes #80 (Airbrake: unexpected code (405). Body: Method Not Allowed) and many other complains of people who are confused by the current behaviour when we raise an error when they ignore current environment.
kyrylo
added a commit
that referenced
this issue
Jun 3, 2016
Fixes #80 (Airbrake: unexpected code (405). Body: Method Not Allowed) and many other complains of people who are confused by the current behaviour when we raise an error when they ignore current environment.
kyrylo
added a commit
that referenced
this issue
Jun 6, 2016
Fixes #80 (Airbrake: unexpected code (405). Body: Method Not Allowed) and many other complains of people who are confused by the current behaviour when we raise an error when they ignore current environment.
this started to happen again, with |
This issue is rather old and a lot has changed since then. Could you open a new one with your config details? |
opened airbrake/airbrake#931 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This error above was caused by something that took me a while to figure out. I am running airbrake (5.0.5) on my application and found that this error comes up when you are setting the
project_id
and theproject_key
to blank values.File:
config/initializers/airbrake.rb
results from command
My Understanding of Results
Most of what I was seeing now makes sense. based off what I see above I get why it resulted in the 405. Because the project_id is not present it changes the URL. So a 405 is exactly what you expect. when you don't have a project_id
Possible Solution
I think a good idea would be to add a check to make sure that the project_id and project key are present before you send the post. If not present warn the user but perform the action anyway. As you could be in the test environment or in the development environment. However there is much more to take into account as you can run the rake airbrake:deploy using RAILS_ENV=development and ENVIRONMENT=staging. So might be be also a solution to only warn if the ENVIRONMENT that you are deploying to is not in the ignore_environemnts varable.
c.ignore_environments = %w(test development)
https://github.com/airbrake/airbrake-ruby/blob/master/lib/airbrake-ruby/config.rb#L100
I am think here on the endpoint method might be the best spot to raise the warning as it seams to be the point in which the data is required to work correctly.
The text was updated successfully, but these errors were encountered: