mediawiktory icon indicating copy to clipboard operation
mediawiktory copied to clipboard

Better errors processing

Open zverok opened this issue 9 years ago • 0 comments

Follow-up of #8

  • Not loose information from API:
    • API response: {"error"=>{"code"=>"gcmmissingparam", "info"=>"One of the parameters cmtitle, cmpageid is required", "*"=>"See https://en.wikipedia.org/w/api.php for API usage"}}
    • Response::Error currenty preserves only "info" field
  • Maybe try to investigate/parse into errors; for ex., here we have gcm prefix in error code and cm-something params in message. In best case, MediaWiktory could say from it something like: params are missing for generator categorymembers, param list title, pageid and return this information structured. Or maybe it is completely superfluous :)

zverok avatar Dec 15 '15 18:12 zverok