[Lunr] Corona: Normalize array data for bad request

Review Request #719 — Created Oct. 23, 2020 and discarded

smillernl
Lunr
fix/corona/badrequest_array
718
720
lunr
Corona: Normalize array data for bad request


  • 1
  • 0
  • 1
  • 0
  • 2
Description From Last Updated
I don't think we should restrict this really. It's just meta info and there could be cases where someone wants ... pprkut pprkut
pprkut
  1. 
      
  2. src/Lunr/Corona/Exceptions/BadRequestException.php (Diff revision 1)
     
     
     
     
     

    var_export is neat, but I don't think this belongs here. Doing this generally here masks situations where you really don't want array (but JSON) data.

    IMHO, if you want to store array values you should do var_export on the call site.

    1. So what do we do here then? UnexpectedValueException?

  3. 
      
smillernl
pprkut
  1. 
      
  2. src/Lunr/Corona/Exceptions/BadRequestException.php (Diff revision 2)
     
     
     
     
     
     

    I don't think we should restrict this really. It's just meta info and there could be cases where someone wants to attach an array or an object here.

    we have the restriction that array data can't be logged to InfluxDB, but that's not a restriction in the BadRequestException, that a restriction in the code that takes the exception data and sends it off.

    So, IMHO, I would just do nothing here.

  3. 
      
smillernl
Review request changed

Status: Discarded

Loading...