Closed Builditluc closed 1 year ago
It seems there is an issue with ModPortalClient::get_mod_spec, so I cannot test this. Returned error:
Error:
0: Error while talking to the API Server
1: error decoding response body: missing field `changelog` at line 1 column 27
2: missing field `changelog` at line 1 column 27
Location:
crates/factorio-cli/src/commands/download_mod.rs:30
Thanks for the contribution! :-D
It seems there is an issue with ModPortalClient::get_mod_spec, so I cannot test this.
Hm. Not sure where this is coming from. The changelog is documented to not be optional. Can you dump the reponse JSON to see what's going on? Maybe the API changed or is documented incorrectly?
If the server does indeed return valid responses without a changelog, I think we should change the type to optional.
Ah, one more thing, can you please also add an entry to CHANGELOG.md
?
Error: 0: Error while talking to the API Server 1: error decoding response body: missing field `changelog` at line 1 column 27 2: missing field `changelog` at line 1 column 27
Looking into that a bit more, I suspect that this is just an unhandled 404 (see #79) . I think you've used "Krastorio 2" as an example before, bute the mod is actually called "Krastorio2", without a space. Could that be it?
Yes, the error handling needs improving...
bute the mod is actually called "Krastorio2",
yes, that was the issue, the mod now downloads correctly. Regarding error handling, I think it would be best to first implement some testing system
Linked to #74