500 errors on deploy group update
danihodovic opened this issue · 8 comments
danihodovic commented
Started PATCH "/deploy_groups/382f0cd6-9fde-5113-9990-cf7b98058872" for 127.0.0.1 at 2019-03-23 15:06:15 +0000
Processing by DeployGroupsController#update as HTML
Parameters: {"deploy_group"=>{"permalink"=>"382f0cd6-9fde-5113-9990-cf7b98058872", "environment_id"=>5, "name_sortable"=>"dg 00382f00000cd00006-00009fde-05113-09990-cf00007b98058872", "env_value"=>"[FILTERED]", "vault_server_id"=>nil, "name"=>"changed 382f0cd6-9fde-5113-9990-cf7b98058872"}, "id"=>"382f0cd6-9fde-5113-9990-cf7b98058872"}
Doorkeeper::AccessToken Load (0.1ms) SELECT "oauth_access_tokens".* FROM "oauth_access_tokens" WHERE "oauth_access_tokens"."token" = ? LIMIT ? [["token", "token"], ["LIMIT", 1]]
Doorkeeper::AccessToken Load (0.1ms) SELECT "oauth_access_tokens".* FROM "oauth_access_tokens" WHERE "oauth_access_tokens"."refresh_token" = ? LIMIT ? [["refresh_token", ""], ["LIMIT", 1]]
(0.1ms) begin transaction
(0.1ms) commit transaction
User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."deleted_at" IS NULL AND "users"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
DeployGroup Load (0.2ms) SELECT "deploy_groups".* FROM "deploy_groups" WHERE "deploy_groups"."deleted_at" IS NULL AND "deploy_groups"."permalink" = ? ORDER BY "deploy_groups"."name_sortable" ASC LIMIT ? [["permalink", "382f0cd6-9fde-5113-9990-cf7b98058872"], ["LIMIT", 1]]
Completed 500 Internal Server Error in 8ms (ActiveRecord: 0.7ms)
ActionController::UnpermittedParameters (found unpermitted parameter: :name_sortable):
app/controllers/deploy_groups_controller.rb:81:in `resource_params'
app/controllers/resource_controller.rb:67:in `block (2 levels) in update'
app/controllers/resource_controller.rb:65:in `update'
grosser commented
also not sure how you get that 500 error ...
app/controllers/concerns/json_exceptions.rb should take care of it ... and works for me :/
... did you do something weird ?
curl -X PATCH -H 'Authorization: Bearer 16a0cbda856656a98bc4b7825985dc726d5512cdb7699811e76837965b501c95' 'http://localhost:3000/deploy_groups/foo.json?deploy_group%5Bname_sortable%5D=bar'
{"status":400,"error":{"name_sortable":["is not permitted"]}}
danihodovic commented
... did you do something weird ?
Define 'something weird'. Here is the PR and the failed build: https://travis-ci.org/danihodovic/ansible-samson/builds/510228314#L1910
The Samson logs are in the issue description above.
danihodovic commented
grosser commented
I meant the samson instance you are coding against should not return a 500
error, but a 400 ... so there is something strange going on
…On Sun, Mar 24, 2019 at 12:14 AM Dani Hodovic ***@***.***> wrote:
#3270 <#3270> fixes my build
https://travis-ci.org/danihodovic/ansible-samson/builds/510506911?utm_source=github_status&utm_medium=notification
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#3269 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAAsZ52pde-9YTrIUzkKFrHR0rYTSogSks5vZyXkgaJpZM4cE9tH>
.
danihodovic commented
I might be running it in dev mode.
grosser commented
ah maybe it's that the request was not `.json`
…On Sun, Mar 24, 2019 at 6:22 PM Dani Hodovic ***@***.***> wrote:
I might be running it in dev mode.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#3269 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAAsZ0_kuzNtvtPyJoc5pVPHt2AJ_Aejks5vaCS8gaJpZM4cE9tH>
.
danihodovic commented
That is correct my friend. JSON support for deploy groups had not been added until recently.