You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The error::Args struct which is used for the error:Error::InvalidArguments variant specifies the format of the name field value.
error::Args::new constructor doesn't check the value of the passed argument to assign to the name field, so developers can use an invalid format without being aware of causing a bug. This format is useful for developers to find out to developers who use the uplink crate to understand that they are calling a public API with an invalid argument, so if the format is wrong it would cause confusion to the end developers.
Because passing an invalid name format is a bug, I was thinking that this should panic; returning a Result doesn't seem to make a lot of sense because how should this error have to be handled?. I understand that panic sounds a no-go for some people, but if the end developer gets a panic he will understand right away there is a bug in the crate and hopefully will open an issue and it will be fix quickly.
Find the place to add this check by searching in the sources TODO(https://github.com/storj-thirdparty/uplink-rust/issues/52).
The text was updated successfully, but these errors were encountered:
The
error::Args
struct which is used for theerror:Error::InvalidArguments
variant specifies the format of thename
field value.error::Args::new
constructor doesn't check the value of the passed argument to assign to thename
field, so developers can use an invalid format without being aware of causing a bug. This format is useful for developers to find out to developers who use theuplink
crate to understand that they are calling a public API with an invalid argument, so if the format is wrong it would cause confusion to the end developers.Because passing an invalid name format is a bug, I was thinking that this should panic; returning a
Result
doesn't seem to make a lot of sense because how should this error have to be handled?. I understand that panic sounds a no-go for some people, but if the end developer gets a panic he will understand right away there is a bug in the crate and hopefully will open an issue and it will be fix quickly.Find the place to add this check by searching in the sources
TODO(https://github.com/storj-thirdparty/uplink-rust/issues/52)
.The text was updated successfully, but these errors were encountered: