Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Do not merge] Refactor to address RFCs #63

Merged
merged 45 commits into from
Jan 24, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
45 commits
Select commit Hold shift + click to select a range
a77abb1
Fixed typo for UNHANDLED error constant
sapessi Dec 2, 2018
36bcc8f
Removed RuntimeApiError trait form the client and changed it to recei…
sapessi Dec 3, 2018
f53bd30
Changed HandlerError type to alias Box<dyn Error> to allow the runtim…
sapessi Dec 3, 2018
8b6d8fc
Added custom error examples and updated existing examples
sapessi Dec 3, 2018
2e034d2
Fixed failure example
sapessi Dec 3, 2018
4f20464
Updated comment on HandlerError type
sapessi Dec 3, 2018
d17b7c8
Exported HandlerError in root of the crate
sapessi Dec 3, 2018
08772e9
Added error code to response structure and centralized backtrace gene…
sapessi Dec 3, 2018
a6d2c5b
Updated example in lib docs
sapessi Dec 3, 2018
fee02e8
Temporary fix for failure example
sapessi Dec 3, 2018
4969624
Switched to HandlerError struct that can be created from any Display …
sapessi Dec 4, 2018
0bce533
Addressed code review changes
sapessi Dec 4, 2018
bd3cb34
Changed error handling codes according to latest specs clarified in #23
sapessi Dec 4, 2018
5b9bad9
Removed custom_attribute feature to fix build
sapessi Dec 4, 2018
9ed9a43
Cleaned up lifetimes/borrows
sapessi Dec 27, 2018
7fa1167
New runtime core crate that implements the runtime main loop and defi…
sapessi Dec 27, 2018
5165242
Slimmed down runtime crate that only wraps the runtime core crate
sapessi Dec 27, 2018
3bcb150
Rebased on master
sapessi Dec 27, 2018
ab54a2e
Moved HandlerError to error module for backward compatibility
sapessi Dec 27, 2018
99b1328
Fixed error package in examples
sapessi Dec 28, 2018
3844b43
Addressing CR on newline at the end of file and import grouping
sapessi Dec 28, 2018
fa2a5b1
More style changes from code review
sapessi Dec 28, 2018
b6423f7
Fixed tests, including http crate
sapessi Dec 28, 2018
77459b5
First refactor of errors in the client crate and new errors crate
sapessi Dec 28, 2018
ecbae1c
Bump dependencies
sapessi Jan 4, 2019
6896b1b
New derive crate (experimental) for LambdaErrorExt and new HandlerErr…
sapessi Jan 4, 2019
3f79fcb
Switched back to ApiError and added new is_recoverable() method
sapessi Jan 4, 2019
1b1e624
Parametrized error type and updated examples
sapessi Jan 4, 2019
7de9169
Switched to more descriptive generic names
sapessi Jan 4, 2019
b991438
Added a new LambdaResultExt to simplify error handling in handlers
sapessi Jan 4, 2019
bedbf92
Added build script to generate the metadata file
sapessi Jan 4, 2019
e3f6b34
Changed the runtime client SDK to receive a user-agent as init param.…
sapessi Jan 5, 2019
253a481
Fixed format of build.rs
sapessi Jan 7, 2019
db7f994
Fixed critical issue in runtime client - request URIs were not genera…
sapessi Jan 10, 2019
f0de223
Fixed code issue - committed to fast earlier
sapessi Jan 10, 2019
d705def
New error tests and failure featurs in Cargo. Still cannot get a back…
sapessi Jan 21, 2019
a3aaedb
failure features import
sapessi Jan 21, 2019
fd35180
Added doc comment on lambda! macro
sapessi Jan 21, 2019
8827cdb
merge latest master changes
sapessi Jan 21, 2019
32cd6e0
Fixed failure dep in Cargo (CR feedback)
sapessi Jan 21, 2019
0f54490
Removed unnecesary test (CR feedback)
sapessi Jan 21, 2019
bb61d71
Another round of CR feedback
sapessi Jan 22, 2019
6891eaa
Added comment to error header as per CR
sapessi Jan 24, 2019
ee12d37
Changed order of deps while cleaning up
sapessi Jan 24, 2019
315c979
Removed commented code as per CR
sapessi Jan 24, 2019
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
/target
/.cargo
lambda-runtime/libtest.rmeta
589 changes: 350 additions & 239 deletions Cargo.lock

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
[workspace]
members = [
"lambda-runtime-client",
"lambda-runtime-core",
"lambda-runtime",
"lambda-http"
]
4 changes: 2 additions & 2 deletions lambda-http/src/ext.rs
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ pub enum PayloadError {
/// extern crate lambda_runtime as lambda;
/// #[macro_use] extern crate serde_derive;
///
/// use lambda::{Context, HandlerError};
/// use lambda::{Context, error::HandlerError};
/// use lambda_http::{Body, Request, Response, RequestExt};
///
/// #[derive(Debug,Deserialize,Default)]
Expand All @@ -67,7 +67,7 @@ pub enum PayloadError {
/// fn handler(
/// request: Request,
/// ctx: lambda::Context
/// ) -> Result<Response<Body>, lambda::HandlerError> {
/// ) -> Result<Response<Body>, HandlerError> {
/// let args: Args = request.payload()
/// .unwrap_or_else(|_parse_err| None)
/// .unwrap_or_default();
Expand Down
2 changes: 1 addition & 1 deletion lambda-http/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
//!
//! ```rust,no_run
//! use lambda_http::{lambda, IntoResponse, Request, RequestExt};
//! use lambda_runtime::{Context, HandlerError};
//! use lambda_runtime::{Context, error::HandlerError};
//!
//! fn main() {
//! lambda!(hello)
Expand Down
3 changes: 2 additions & 1 deletion lambda-runtime-client/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,5 @@ serde = "^1"
serde_json = "^1"
serde_derive = "^1"
log = "0.4"
backtrace = "0.3"
lambda_runtime_errors = { path = "../lambda-runtime-errors", version = "^0.1" }
failure = "^0.1"
Loading