if `fetch` or `req.json` fails, catch those errors and return a default error to the user
if the res payload indicates error but doesn't return a `reason`, also return the same
default error message to the user
check to ensure that a nym is provided to the login command before
proceeding. if omitted, echo an error message, display the help
for the login command, then exit with a non-zero exit code
* Add top cowboys, stackers, and spenders to newsletter
* Rearrange to match the issue title
* fix top spenders `by` variable
* Update user resolver for top users `spending` `by` value
* wrap in try catch to not have errors break the script execution
return the array as defined whenever an error occurs
* Handle archived territories in territory form
* Use dedicated mutation
* Add sanity check for eternal territories
* Fix fields and cost ignored
* Remove no longer needed manual validation in upsertSub
* Remove founder check
* Always check if sub is archived
Using { abortEarly: false } now since previously, if no description was not given, we wouldn't detect if the sub was archived since validation would abort on empty descriptions.
Only on submission all fields would get validated but since we ignore archived errors during submission, the user would never see that the sub is archived before submission
+ the wrong mutation would run if archived is not already true before submission.
Hence, we need to validate all fields always.
There is currently still a bug where the validation does not immediately run but maybe this can be fixed by simply using validateImmediately on the Formik component.
* Fix archived warning not shown after first render
* Only create transfers if owner actually changes
* Reuse helper functions in lib/territory.js
* Rename var to editing
* Use onChange instead of validation override
* Run same validation on server for unarchiving
* Fix 'territory archived' shown during edits
* Use && instead of ternary operator for conditional query
---------
Co-authored-by: Keyan <34140557+huumn@users.noreply.github.com>