Reputation
321
Next privilege 500 Rep.
Access review queues
Badges
2 13
Newest
 Teacher
Impact
~7k people reached

  • 0 posts edited
  • 0 helpful flags
  • 17 votes cast
Mar
12
awarded  Teacher
Mar
11
answered Why have private fields, isn't protected enough?
Nov
2
comment Best practice for angular service return value
Thanks, I realize now I could have formatted my question better. I suppose the question is more, "Should the API layer translate the 4xx/5xx into something else before sending it to the data layer? If so, what? Or should the API layer send the 4xx/5xx as is to the data layer for the data layer to interpret?" For example, if this were a synchronous server I would just throw an exception.
Nov
2
awarded  Editor
Nov
2
comment Best practice for angular service return value
Thanks, didn't mean to be returning anything in either call.
Nov
2
revised Best practice for angular service return value
Fixed the double returns
Oct
8
comment Best practice for angular service return value
A promise wouldn't be much different than taking in a success/failure callback. I'm trying to avoid propagating the failure handling logic all the way up the stack. In synchronous code this would be equivalent to having a try/catch at every layer in the hierarchy due to a potential error at the lowest layer which I would view as an anti-pattern. To make the distinction I could always log an error message to an error service which displays the message to some global error (non-view specific) field visible to the user.
Oct
8
awarded  Nice Question
Oct
7
asked Best practice for angular service return value
Sep
21
awarded  Yearling
Jun
24
awarded  Notable Question
Jul
2
awarded  Curious
Jun
11
awarded  Popular Question
Apr
17
asked Best approach for tracking dependent state
Dec
27
awarded  Popular Question
Mar
24
comment How can I learn to effectively write Pythonic code?
+1 Once you know the basics of a language, reading code will help far more than reading books.
Mar
24
accepted High-Availability Vs. Cloud Scaling
Mar
22
asked High-Availability Vs. Cloud Scaling
Dec
2
awarded  Commentator
Dec
2
comment Why is the sudden increase in number of Git submitters on Debian popcon graph in 2010-01?
git-core is just not as cool of a name. Once they changed that everything was rainbows and unicorns.