public async Task <ActionResult <CapturedPasswordCredential> > CreatePasswordCredential([FromBody] CapturedPasswordCredential credential) { try { CapturedPasswordCredential addedCredential = await _service.CreatePasswordCredential(credential); return(CreatedAtRoute(nameof(GetPasswordCredential), new { id = addedCredential.Id }, addedCredential)); } catch (ControllerNotFoundException e) { return(NotFound(e.Message)); } catch (ControllerBadRequestException e) { return(BadRequest(e.Message)); } catch (ControllerUnauthorizedException) { return(new UnauthorizedResult()); } }