Skip to content

500 http status when uploading to deleted data provider #1544

Description

@MontrealSergiy

If data provider indicated at upload does not exist (any more), CBRAIN yield exception leading to 500 Internal Server Error, while 404 Not Found is more appropriate. Or, perhaps, default provider should be used instead.

NoMethodError (undefined method `content_storage_shared_between_users?' for nil:NilClass):
  
app/models/userfile.rb:1141:in `flat_dir_dp_name_uniqueness'
app/controllers/userfiles_controller.rb:560:in `create'

I think using safe navigation with that method would be enough

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

APIAPI issues or Swagger description

Type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions