Authentication-Results: mail-b.sr.ht; dkim=none Received: from cressida.uberspace.de (cressida.uberspace.de [185.26.156.202]) by mail-b.sr.ht (Postfix) with ESMTPS id 30D9FFF11A for <~vpzom/lotide@lists.sr.ht>; Tue, 29 Dec 2020 14:07:49 +0000 (UTC) Received: (qmail 18524 invoked from network); 29 Dec 2020 14:07:47 -0000 Received: from localhost (HELO localhost) (127.0.0.1) by cressida.uberspace.de with SMTP; 29 Dec 2020 14:07:47 -0000 From: Matthias Beyer To: colin@vpzom.click Cc: ~vpzom/lotide@lists.sr.ht Subject: Question about lotide/hitide Date: Tue, 29 Dec 2020 15:07:42 +0100 Message-ID: <5432858.DvuYhMxLoT@hoshi> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="nextPart5680881.lOV4Wx5bFT"; micalg="pgp-sha256"; protocol="application/pgp-signature" --nextPart5680881.lOV4Wx5bFT Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii"; protected-headers="v1" From: Matthias Beyer To: colin@vpzom.click Cc: ~vpzom/lotide@lists.sr.ht Subject: Question about lotide/hitide Date: Tue, 29 Dec 2020 15:07:42 +0100 Message-ID: <5432858.DvuYhMxLoT@hoshi> Hi Colin, I want to develop a patch for lotide and hitide to fix the following thing: If I want to "Add by ID" a community and use "1" as a query, I get a 500 Internal server error in hitide. The API returns a lotide::Error::InternalStrStatic, but hitide gets a RemoteError((500, "Internal Server Error")). The error happens because lotide::routes::api::parse_lookup() returns the error. I guess that's because hyper does some conversion in between. I would like to be able to show the user a page indicating that the query was invalid. How would you approach this? Where do I have to look for howto return a less generic error to hitide? I would love to get some pointers from you for this, so I can develop the patch on my own, to get to know the codebase better. -- Matthias --nextPart5680881.lOV4Wx5bFT Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part. Content-Transfer-Encoding: 7Bit -----BEGIN PGP SIGNATURE----- iQIzBAABCAAdFiEEUJGUus1GMTrRclzcEKWX9Kitz80FAl/rOC4ACgkQEKWX9Kit z81hKg//d0aaYVxGgOBp/yzT9MX33xYt7vH6szbu4aQ/r8Bl9n2VQG5hkW4OM2VF 7HzLply5SeJiMQmVwc7Twk8vZBD4yfuAeNIDUlKDZVt9me2S+gv4TCbVe0efvDRv /DQFT0gn2p/IwS/hbGvV0I7YT1oUOaNz8ae7CW1sgeucrqES2UBP0yOdRAb53JZF sZZ3M6jcXm7YQjmGtGJLUIBzE5EA0dZAVauYBvSuwGzekJkRnm2PNDgkXxrMnxVJ rrpfVtYpkIjptL/cYyqVqzNwtVn4IwWVnMFNrlrv2/TSRBEgCpyK/ULxzd/+dTOE g5xXmjDTJTW+ueStTXt8EF7WNpFxd0JgllQlRT8342XRC8wZwya3Al3URgCuwYqD FK7aBsomsi06XRpxWod/RsDNhqoCmf1yDnqq+aqIjbGJWPgGJW2YRANdPHSofyMy iGZmEbVFzXTM7w0FHyIsQeq1HSKf9kI/W21q8YmbWbX8EhVPsZbnRXlB2ZHxr7Uf FujylkkbVxBJLi1OYj4dX/b9iduq+UGP+h9Wj/UQDjZnOEHVMeF7zhdmYEm873Jg bltIUFqwzX3XG4TiZhckASBEtWvCD2BhnOTchNJbkDVCCblV0vklc9hl+5+5lJ2V RA4jbTdzpYz4wLRRrOpymAFVvdPygPBJmwvLuvbjYgp3fobY5VA= =4irV -----END PGP SIGNATURE----- --nextPart5680881.lOV4Wx5bFT--