Class: Safrano::BadRequestSelectInvalidProps

Inherits:
BadRequestError show all
Includes:
ErrorInstance
Defined in:
lib/odata/error.rb

Overview

for invalid properti(es) in $select param

Constant Summary

Constants inherited from BadRequestError

Safrano::BadRequestError::HTTP_CODE

Constants included from ErrorClass

ErrorClass::EMPTYH

Instance Method Summary collapse

Methods included from ErrorInstance

#msg, #odata_get

Methods included from Contract::Invalid

#collect_result!, #error, #if_error, #if_valid, #if_valid_collect, #map_result!, #result, #tap_error, #tap_valid

Methods included from ErrorClass

#http_code, #odata_get

Constructor Details

#initialize(model, iprops) ⇒ BadRequestSelectInvalidProps

Returns a new instance of BadRequestSelectInvalidProps.



218
219
220
# File 'lib/odata/error.rb', line 218

def initialize(model, iprops)
  @msg = (iprops.size > 1 ? "Bad Request: the $select properties #{iprops.to_a.join(', ')} are invalid for entityset #{model.entity_set_name}" : "Bad Request: the $select property #{iprops.first} is invalid for entityset #{model.entity_set_name}")
end