summaryrefslogtreecommitdiff
path: root/src/http
diff options
context:
space:
mode:
Diffstat (limited to 'src/http')
-rw-r--r--src/http/mod.rs8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/http/mod.rs b/src/http/mod.rs
index a133f09..4523d3b 100644
--- a/src/http/mod.rs
+++ b/src/http/mod.rs
@@ -12,15 +12,15 @@ pub struct Server {
}
impl Server {
- pub fn new(addr: String) -> Server {
+ pub fn new(addr: String) -> Result<Server, Box<dyn std::error::Error>> {
let mut config = Config::from_env();
config.bind_addr = addr;
config.issuer_url = format!("http://{}", config.bind_addr);
- Server {
- oauth_server: OAuthServer::new(&config),
+ Ok(Server {
+ oauth_server: OAuthServer::new(&config)?,
config,
- }
+ })
}
pub fn start(&self) {